1 | <?php |
||
12 | class EveOnline extends AbstractProvider |
||
13 | { |
||
14 | use BearerAuthorizationTrait; |
||
15 | |||
16 | |||
17 | /** |
||
18 | * Default scopes |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | public $defaultScopes = []; |
||
23 | |||
24 | /** |
||
25 | * Get the string used to separate scopes. |
||
26 | * |
||
27 | * @return string |
||
28 | */ |
||
29 | 9 | protected function getScopeSeparator() |
|
33 | |||
34 | /** |
||
35 | * Returns the base URL for authorizing a client. |
||
36 | * |
||
37 | * Eg. https://oauth.service.com/authorize |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | 9 | public function getBaseAuthorizationUrl() |
|
45 | |||
46 | /** |
||
47 | * Returns the base URL for requesting an access token. |
||
48 | * |
||
49 | * Eg. https://oauth.service.com/token |
||
50 | * |
||
51 | * @param array $params |
||
52 | * @return string |
||
53 | */ |
||
54 | 18 | public function getBaseAccessTokenUrl(array $params) |
|
58 | |||
59 | /** |
||
60 | * Returns the URL for requesting the resource owner's details. |
||
61 | * |
||
62 | * @param AccessToken $token |
||
63 | * @return string |
||
64 | */ |
||
65 | 3 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
69 | |||
70 | /** |
||
71 | * Returns the default scopes used by this provider. |
||
72 | * |
||
73 | * This should only be the scopes that are required to request the details |
||
74 | * of the resource owner, rather than all the available scopes. |
||
75 | * |
||
76 | * @return array |
||
77 | */ |
||
78 | 6 | protected function getDefaultScopes() |
|
82 | |||
83 | /** |
||
84 | * Checks a provider response for errors. |
||
85 | * |
||
86 | * @throws IdentityProviderException |
||
87 | * @param ResponseInterface $response |
||
88 | * @param array|string $data Parsed response data |
||
89 | * @return void |
||
90 | */ |
||
91 | 15 | protected function checkResponse(ResponseInterface $response, $data) |
|
110 | |||
111 | /** |
||
112 | * Generates a resource owner object from a successful resource owner |
||
113 | * details request. |
||
114 | * |
||
115 | * @param array $response |
||
116 | * @param AccessToken $token |
||
117 | * @return ResourceOwnerInterface |
||
118 | */ |
||
119 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
123 | |||
124 | /** |
||
125 | * Internal helper function to safe read from an array |
||
126 | * @param array $array |
||
127 | * @param string|int $key |
||
128 | * @return null |
||
129 | */ |
||
130 | 6 | private function safeRead(array $array, $key) |
|
134 | } |
||
135 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.