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