1 | <?php namespace nyx\auth\id\protocols\oauth2\providers; |
||
16 | class Slack extends oauth2\Provider |
||
17 | { |
||
18 | /** |
||
19 | * {@inheritDoc} |
||
20 | */ |
||
21 | const URL_AUTHORIZE = 'https://slack.com/oauth/authorize'; |
||
22 | const URL_EXCHANGE = 'https://slack.com/api/oauth.access'; |
||
23 | const URL_IDENTIFY = 'https://slack.com/api/users.identity'; |
||
24 | |||
25 | /** |
||
26 | * {@inheritDoc} |
||
27 | */ |
||
28 | const IDENTITY = auth\id\identities\Slack::class; |
||
29 | |||
30 | /** |
||
31 | * {@inheritDoc} |
||
32 | * |
||
33 | * Note: The "identity" scopes cannot be requested alongside other scopes, as Slack otherwise |
||
34 | * returns an 'invalid_scope' error. |
||
35 | */ |
||
36 | protected $defaultScopes = ['identity.basic', 'identity.email', 'identity.avatar']; |
||
37 | |||
38 | /** |
||
39 | * {@inheritDoc} |
||
40 | */ |
||
41 | protected function getDefaultRequestOptions(auth\interfaces\Token $token = null) : array |
||
55 | } |
||
56 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.