1 | <?php namespace nyx\auth\id\protocols\oauth2\providers; |
||
16 | class Slack extends oauth2\Provider |
||
17 | { |
||
18 | /** |
||
19 | * {@inheritDoc} |
||
20 | */ |
||
21 | const SCOPE_SEPARATOR = ' '; |
||
22 | |||
23 | /** |
||
24 | * {@inheritDoc} |
||
25 | */ |
||
26 | const URL_AUTHORIZE = 'https://slack.com/oauth/authorize'; |
||
27 | const URL_EXCHANGE = 'https://slack.com/api/oauth.access'; |
||
28 | const URL_IDENTIFY = 'https://slack.com/api/users.identity'; |
||
29 | |||
30 | /** |
||
31 | * {@inheritDoc} |
||
32 | */ |
||
33 | const IDENTITY = auth\id\identities\Slack::class; |
||
34 | |||
35 | /** |
||
36 | * {@inheritDoc} |
||
37 | * |
||
38 | * Note: The "identity" scopes cannot be requested alongside other scopes, as Slack otherwise |
||
39 | * returns an 'invalid_scope' error. |
||
40 | */ |
||
41 | protected $defaultScopes = ['identity.basic', 'identity.email', 'identity.avatar']; |
||
42 | |||
43 | /** |
||
44 | * {@inheritDoc} |
||
45 | */ |
||
46 | protected function getDefaultRequestOptions(auth\interfaces\Token $token = null) : array |
||
60 | } |
||
61 |