@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | $clientAuthenticationMethodUsed = null; |
58 | 58 | $authenticated = false; |
59 | 59 | foreach ($this->clientAuthenticationMethods as $identifier => $clientAuthenticationMethod) { |
60 | - if($clientAuthenticationMethod->support($request, $requestData)) { |
|
61 | - if($clientAuthenticationMethodUsedIdentifier) { |
|
60 | + if ($clientAuthenticationMethod->support($request, $requestData)) { |
|
61 | + if ($clientAuthenticationMethodUsedIdentifier) { |
|
62 | 62 | throw new OAuthException('invalid_request', |
63 | 63 | 'The request utilizes more than one mechanism for authenticating the client.', |
64 | 64 | 'https://tools.ietf.org/html/rfc6749#section-3.2.1'); |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | - if($clientAuthenticationMethodUsed) { |
|
72 | - if(!$client = $clientAuthenticationMethod->authenticate($request, $requestData)) { |
|
71 | + if ($clientAuthenticationMethodUsed) { |
|
72 | + if (!$client = $clientAuthenticationMethod->authenticate($request, $requestData)) { |
|
73 | 73 | throw new OAuthException('invalid_client', |
74 | 74 | 'Client authentication failed. Unknown client.', |
75 | 75 | 'https://tools.ietf.org/html/rfc6749#section-3.2.1'); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | 'https://tools.ietf.org/html/rfc6749#section-4.1'); |
86 | 86 | } |
87 | 87 | |
88 | - if($client->hasCredentials()) { |
|
88 | + if ($client->hasCredentials()) { |
|
89 | 89 | if (!$authenticated) { |
90 | 90 | throw new OAuthException('invalid_client', 'Client authentication failed. No client authentication included', |
91 | 91 | 'https://tools.ietf.org/html/rfc6749#section-3.2.1'); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | $tokenEndpointAuthMethod = $client->getMetadata()->getTokenEndpointAuthMethod() ?: 'client_secret_basic'; |
99 | - if($tokenEndpointAuthMethod !== $clientAuthenticationMethodUsedIdentifier) { |
|
99 | + if ($tokenEndpointAuthMethod !== $clientAuthenticationMethodUsedIdentifier) { |
|
100 | 100 | throw new OAuthException('invalid_client', |
101 | 101 | 'Client authentication failed. Unsupported authentication method.', |
102 | 102 | 'https://tools.ietf.org/html/rfc6749#section-3.2.1'); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | function authenticate(ServerRequestInterface $request, array $requestData): ?ClientInterface |
35 | 35 | { |
36 | 36 | $client = $this->clientStorage->get($requestData['client_id']); |
37 | - if($client instanceof ConfidentialClient && $client->getPassword() == $requestData['client_secret']) { |
|
37 | + if ($client instanceof ConfidentialClient && $client->getPassword() == $requestData['client_secret']) { |
|
38 | 38 | return $client; |
39 | 39 | } |
40 | 40 | return null; |
@@ -13,5 +13,5 @@ |
||
13 | 13 | |
14 | 14 | interface ScopePolicyInterface |
15 | 15 | { |
16 | - function getDefaultScopes(ClientInterface $client) : ?array ; |
|
16 | + function getDefaultScopes(ClientInterface $client) : ?array; |
|
17 | 17 | } |
18 | 18 | \ No newline at end of file |