1 | <?php namespace Stevenmaguire\Services\Trello\Traits; |
||
5 | trait AuthorizationTrait |
||
6 | { |
||
7 | /** |
||
8 | * Retrieves currently configured authorization broker. |
||
9 | * |
||
10 | * @return Stevenmaguire\Services\Trello\Authorization |
||
11 | * @codeCoverageIgnore |
||
12 | */ |
||
13 | abstract public function getAuthorization(); |
||
14 | |||
15 | /** |
||
16 | * Retrieves currently configured http broker. |
||
17 | * |
||
18 | * @return Stevenmaguire\Services\Trello\Http |
||
19 | * @codeCoverageIgnore |
||
20 | */ |
||
21 | abstract public function getHttp(); |
||
22 | |||
23 | /** |
||
24 | * Retrieves http response from Trello api for authorization. |
||
25 | * |
||
26 | * @param array $attributes |
||
27 | * |
||
28 | * @return object |
||
29 | */ |
||
30 | 2 | public function getAuthorize($attributes = []) |
|
34 | |||
35 | /** |
||
36 | * Retrieves complete authorization url. |
||
37 | * |
||
38 | * @param League\OAuth1\Client\Credentials\TemporaryCredentials $temporaryCredentials |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | 4 | public function getAuthorizationUrl(TemporaryCredentials $temporaryCredentials = null) |
|
46 | |||
47 | /** |
||
48 | * Retrives access token credentials with token and verifier. |
||
49 | * |
||
50 | * @param string $token |
||
51 | * @param string $verifier |
||
52 | * @param League\OAuth1\Client\Credentials\TemporaryCredentials $temporaryCredentials |
||
53 | * |
||
54 | * @return League\OAuth1\Client\Credentials\CredentialsInterface |
||
55 | */ |
||
56 | 4 | public function getAccessToken($token, $verifier, TemporaryCredentials $temporaryCredentials = null) |
|
60 | |||
61 | /** |
||
62 | * Creates and returns new temporary credentials instance. |
||
63 | * |
||
64 | * @return League\OAuth1\Client\Credentials\CredentialsInterface |
||
65 | */ |
||
66 | 2 | public function getTemporaryCredentials() |
|
70 | } |
||
71 |