1 | <?php |
||
9 | class Microsoft extends AbstractService |
||
10 | { |
||
11 | const SCOPE_BASIC = 'wl.basic'; |
||
12 | const SCOPE_OFFLINE = 'wl.offline_access'; |
||
13 | const SCOPE_SIGNIN = 'wl.signin'; |
||
14 | const SCOPE_BIRTHDAY = 'wl.birthday'; |
||
15 | const SCOPE_CALENDARS = 'wl.calendars'; |
||
16 | const SCOPE_CALENDARS_UPDATE = 'wl.calendars_update'; |
||
17 | const SCOPE_CONTACTS_BIRTHDAY = 'wl.contacts_birthday'; |
||
18 | const SCOPE_CONTACTS_CREATE = 'wl.contacts_create'; |
||
19 | const SCOPE_CONTACTS_CALENDARS = 'wl.contacts_calendars'; |
||
20 | const SCOPE_CONTACTS_PHOTOS = 'wl.contacts_photos'; |
||
21 | const SCOPE_CONTACTS_SKYDRIVE = 'wl.contacts_skydrive'; |
||
22 | const SCOPE_EMAILS = 'wl.emails'; |
||
23 | const SCOPE_EVENTS_CREATE = 'wl.events_create'; |
||
24 | const SCOPE_MESSENGER = 'wl.messenger'; |
||
25 | const SCOPE_PHONE_NUMBERS = 'wl.phone_numbers'; |
||
26 | const SCOPE_PHOTOS = 'wl.photos'; |
||
27 | const SCOPE_POSTAL_ADDRESSES = 'wl.postal_addresses'; |
||
28 | const SCOPE_SHARE = 'wl.share'; |
||
29 | const SCOPE_SKYDRIVE = 'wl.skydrive'; |
||
30 | const SCOPE_SKYDRIVE_UPDATE = 'wl.skydrive_update'; |
||
31 | const SCOPE_WORK_PROFILE = 'wl.work_profile'; |
||
32 | const SCOPE_APPLICATIONS = 'wl.applications'; |
||
33 | const SCOPE_APPLICATIONS_CREATE = 'wl.applications_create'; |
||
34 | const SCOPE_IMAP = 'wl.imap'; |
||
35 | |||
36 | /** |
||
37 | * MS uses some magical not officialy supported scope to get even moar info like full emailaddresses. |
||
38 | * They agree that giving 3rd party apps access to 3rd party emailaddresses is a pretty lame thing to do so in all |
||
39 | * their wisdom they added this scope because fuck you that's why. |
||
40 | * |
||
41 | * https://github.com/Lusitanian/PHPoAuthLib/issues/214 |
||
42 | * http://social.msdn.microsoft.com/Forums/live/en-US/c6dcb9ab-aed4-400a-99fb-5650c393a95d/how-retrieve-users- |
||
43 | * contacts-email-address?forum=messengerconnect |
||
44 | * |
||
45 | * Considering this scope is not officially supported: use with care |
||
46 | */ |
||
47 | const SCOPE_CONTACTS_EMAILS = 'wl.contacts_emails'; |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | protected function init() |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function getAuthorizationEndpoint() |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function getAccessTokenEndpoint() |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function getAuthorizationMethod() |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | protected function parseAccessTokenResponse($responseBody) |
||
112 | } |
||
113 |