1 | <?php |
||
19 | class MicrosoftGraph extends AbstractService |
||
20 | { |
||
21 | private $resources = array( |
||
22 | 'graph' => 'https://graph.windows.net/' |
||
23 | ); |
||
24 | public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, array $scopes = array(), UriInterface $baseApiUri = null, $stateParameterInAutUrl = false, $apiVersion = "") |
||
31 | |||
32 | /** |
||
33 | * Parses the access token response and returns a TokenInterface. |
||
34 | * |
||
35 | * |
||
36 | * @param string $responseBody |
||
37 | * |
||
38 | * @return TokenInterface |
||
39 | * |
||
40 | * @throws TokenResponseException |
||
41 | */ |
||
42 | protected function parseAccessTokenResponse($responseBody) |
||
65 | |||
66 | /** |
||
67 | * Returns the authorization API endpoint. |
||
68 | * |
||
69 | * @return UriInterface |
||
70 | */ |
||
71 | public function getAuthorizationEndpoint() |
||
75 | |||
76 | /** |
||
77 | * Returns the access token API endpoint. |
||
78 | * |
||
79 | * @return UriInterface |
||
80 | */ |
||
81 | public function getAccessTokenEndpoint() |
||
85 | |||
86 | /** |
||
87 | * @param $code |
||
88 | * @param null $state |
||
89 | * @return TokenInterface |
||
90 | * @throws Exception\InvalidAuthorizationStateException |
||
91 | * @throws TokenResponseException |
||
92 | */ |
||
93 | public function requestAccessToken($code, $state = null) |
||
115 | |||
116 | /** |
||
117 | * Devuelve los heades que tendra obtener el AccessToken |
||
118 | * @return array |
||
119 | */ |
||
120 | protected function getExtraOAuthHeaders() |
||
126 | |||
127 | /** |
||
128 | * Returns a class constant from ServiceInterface define el metodo e autorizacion del API |
||
129 | * Header is the sane default. |
||
130 | * |
||
131 | * @return int |
||
132 | */ |
||
133 | protected function getAuthorizationMethod() |
||
137 | } |