Total Complexity | 2 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class SlackConnectionFactory implements VendorConnectionFactory |
||
17 | { |
||
18 | const DEFAULT_PERMISSIONS = 'identity.basic,identity.email,identity.team,identity.avatar'; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $permissions; |
||
24 | |||
25 | 1 | public function __construct($permissions = self::DEFAULT_PERMISSIONS) |
|
26 | { |
||
27 | 1 | $this->permissions = $permissions; |
|
28 | 1 | } |
|
29 | |||
30 | /** |
||
31 | * @param string $clientId the client id which can be generated at the third party portal |
||
32 | * @param string $clientSecret this can be found similar to the clientId |
||
33 | * @param string $callbackUrl the url to callback after a third party auth attempt |
||
34 | * @return VendorConnection |
||
35 | */ |
||
36 | 1 | public function get($clientId, $clientSecret, $callbackUrl) |
|
46 | 1 | ); |
|
47 | } |
||
49 |