1 | <?php declare(strict_types=1); |
||
42 | abstract class BaseAuthorizationServer implements AuthorizationServerInterface, AII, III, PII, CII, RII |
||
43 | { |
||
44 | use OAuthServerTrait, |
||
45 | CodeGrantTrait, ImplicitGrantTrait, PasswordGrantTrait, ClientGrantTrait, RefreshGrantTrait; |
||
46 | |||
47 | /** |
||
48 | * Implements Authorization Endpoint. |
||
49 | * |
||
50 | * @param array $parameters |
||
51 | * |
||
52 | * @return ResponseInterface |
||
53 | * |
||
54 | * @link https://tools.ietf.org/html/rfc6749#section-3.1 |
||
55 | * @link https://tools.ietf.org/html/rfc6749#section-4.2.1 |
||
56 | */ |
||
57 | abstract protected function createAuthorization(array $parameters): ResponseInterface; |
||
58 | |||
59 | /** |
||
60 | * @var null|int |
||
61 | */ |
||
62 | private $maxStateLength = null; |
||
63 | 44 | ||
64 | /** |
||
65 | 44 | * Constructor. |
|
66 | 44 | */ |
|
67 | 44 | public function __construct() |
|
75 | 13 | ||
76 | /** |
||
77 | 13 | * @inheritdoc |
|
78 | */ |
||
79 | public function getCreateAuthorization(ServerRequestInterface $request): ResponseInterface |
||
83 | 2 | ||
84 | /** |
||
85 | 2 | * @inheritdoc |
|
86 | */ |
||
87 | public function postCreateAuthorization(ServerRequestInterface $request): ResponseInterface |
||
91 | 4 | ||
92 | /** |
||
93 | 4 | * @inheritdoc |
|
94 | */ |
||
95 | public function codeValidateScope(ClientInterface $client, array $scopes = null): array |
||
99 | 4 | ||
100 | /** |
||
101 | 4 | * @inheritdoc |
|
102 | */ |
||
103 | public function implicitValidateScope(ClientInterface $client, array $scopes = null): array |
||
107 | 5 | ||
108 | /** |
||
109 | 5 | * @inheritdoc |
|
110 | */ |
||
111 | public function passValidateScope(ClientInterface $client = null, array $scopes = null): array |
||
115 | 3 | ||
116 | /** |
||
117 | 3 | * @inheritdoc |
|
118 | */ |
||
119 | public function clientValidateScope(ClientInterface $client, array $scopes = null): array |
||
123 | 12 | ||
124 | /** |
||
125 | 12 | * @return int|null |
|
126 | */ |
||
127 | public function getMaxStateLength(): ?int |
||
131 | |||
132 | /** |
||
133 | 2 | * @param int|null $maxStateLength |
|
134 | * |
||
135 | 2 | * @return self |
|
136 | */ |
||
137 | 2 | public function setMaxStateLength(int $maxStateLength = null): self |
|
145 | |||
146 | /** |
||
147 | 12 | * @param array $parameters |
|
148 | * |
||
149 | 12 | * @return string |
|
150 | */ |
||
151 | protected function encodeAsXWwwFormUrlencoded(array $parameters): string |
||
155 | } |
||
156 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.