@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -125,13 +125,13 @@ discard block |
||
125 | 125 | private function getParametersToCheck(): array |
126 | 126 | { |
127 | 127 | return [ |
128 | - 'id' => function ($value, AccessToken $accessToken) { |
|
128 | + 'id' => function($value, AccessToken $accessToken) { |
|
129 | 129 | return hash_equals($accessToken->getTokenId()->getValue(), $value); |
130 | 130 | }, |
131 | - 'ts' => function ($value) { |
|
131 | + 'ts' => function($value) { |
|
132 | 132 | return time() < $this->getTimestampLifetime() + (int) $value; |
133 | 133 | }, |
134 | - 'nonce' => function () { |
|
134 | + 'nonce' => function() { |
|
135 | 135 | return true; |
136 | 136 | }, |
137 | 137 | ]; |
@@ -155,13 +155,13 @@ discard block |
||
155 | 155 | $ext = array_key_exists('ext', $values) ? $values['ext'] : null; |
156 | 156 | |
157 | 157 | $basestr = |
158 | - $timestamp . "\n" . |
|
159 | - $nonce . "\n" . |
|
160 | - $method . "\n" . |
|
161 | - $request_uri . "\n" . |
|
162 | - $host . "\n" . |
|
163 | - $port . "\n" . |
|
164 | - $ext . "\n"; |
|
158 | + $timestamp."\n". |
|
159 | + $nonce."\n". |
|
160 | + $method."\n". |
|
161 | + $request_uri."\n". |
|
162 | + $host."\n". |
|
163 | + $port."\n". |
|
164 | + $ext."\n"; |
|
165 | 165 | |
166 | 166 | $algorithms = $this->getAlgorithmMap(); |
167 | 167 | Assertion::keyExists($algorithms, $token->getParameter('mac_algorithm'), sprintf('The MAC algorithm \'%s\' is not supported.', $token->getParameter('mac_algorithm'))); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | * |
193 | 193 | * @return bool |
194 | 194 | */ |
195 | - private function isHeaderValid(string $header, array &$additionalCredentialValues, string &$token = null): bool |
|
195 | + private function isHeaderValid(string $header, array &$additionalCredentialValues, string & $token = null): bool |
|
196 | 196 | { |
197 | 197 | if (1 === preg_match('/(\w+)=("((?:[^"\\\\]|\\\\.)+)"|([^\s,$]+))/', $header, $matches)) { |
198 | 198 | preg_match_all('/(\w+)=("((?:[^"\\\\]|\\\\.)+)"|([^\s,$]+))/', $header, $matches, PREG_SET_ORDER); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } |
147 | 147 | |
148 | 148 | foreach ($authorization_headers as $authorization_header) { |
149 | - if (1 === preg_match('/' . preg_quote('Bearer', '/') . '\s([a-zA-Z0-9\-_\+~\/\.]+)/', $authorization_header, $matches)) { |
|
149 | + if (1 === preg_match('/'.preg_quote('Bearer', '/').'\s([a-zA-Z0-9\-_\+~\/\.]+)/', $authorization_header, $matches)) { |
|
150 | 150 | return $matches[1]; |
151 | 151 | } |
152 | 152 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | * |
90 | 90 | * @return string|null |
91 | 91 | */ |
92 | - public function findToken(ServerRequestInterface $request, array &$additionalCredentialValues, TokenTypeInterface &$type = null) |
|
92 | + public function findToken(ServerRequestInterface $request, array &$additionalCredentialValues, TokenTypeInterface & $type = null) |
|
93 | 93 | { |
94 | 94 | foreach ($this->all() as $tmp_type) { |
95 | 95 | $tmpAdditionalCredentialValues = []; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |