1 | <?php declare(strict_types=1); |
||
30 | trait OAuthServerTrait |
||
31 | { |
||
32 | /** |
||
33 | * If input redirect URI is optional (client default URI will be used if possible). |
||
34 | * |
||
35 | * @var bool |
||
36 | 5 | */ |
|
37 | private $isInputUriOptional = true; |
||
38 | 5 | ||
39 | /** |
||
40 | * @return boolean |
||
41 | */ |
||
42 | public function isInputUriOptional(): bool |
||
46 | 1 | ||
47 | /** |
||
48 | * @return void |
||
49 | */ |
||
50 | public function setInputUriOptional(): void |
||
54 | 1 | ||
55 | /** |
||
56 | * @return void |
||
57 | */ |
||
58 | public function setInputUriMandatory(): void |
||
62 | |||
63 | /** |
||
64 | * @param string[] $parameters |
||
65 | 15 | * |
|
66 | * @return string|null |
||
67 | 15 | * |
|
68 | * @link https://tools.ietf.org/html/rfc6749#section-4.1.1 |
||
69 | * @link https://tools.ietf.org/html/rfc6749#section-4.2.1 |
||
70 | */ |
||
71 | protected function getResponseType(array $parameters): ?string |
||
75 | |||
76 | /** |
||
77 | * @param string[] $parameters |
||
78 | * |
||
79 | 28 | * @return string|null |
|
80 | * |
||
81 | 28 | * @link https://tools.ietf.org/html/rfc6749#section-4.1.3 |
|
82 | * @link https://tools.ietf.org/html/rfc6749#section-4.3.2 |
||
83 | * @link https://tools.ietf.org/html/rfc6749#section-4.4.2 |
||
84 | */ |
||
85 | protected function getGrantType(array $parameters): ?string |
||
89 | |||
90 | 16 | /** |
|
91 | * @param array|null $scopes |
||
92 | 16 | * @param ClientInterface|null $client |
|
|
|||
93 | 7 | * |
|
94 | 7 | * @return array [bool $isScopeValid, string[]|null $scopeList, bool $isScopeModified] |
|
95 | */ |
||
96 | 7 | protected function validateScope(ClientInterface $client, array $scopes = null): array |
|
112 | |||
113 | 15 | /** |
|
114 | * @param ClientInterface $client |
||
115 | 15 | * @param string|null $redirectUri |
|
116 | 15 | * |
|
117 | 15 | * @return string|null |
|
118 | */ |
||
119 | protected function selectValidRedirectUri(ClientInterface $client, string $redirectUri = null): ?string |
||
140 | } |
||
141 |