@@ -44,7 +44,7 @@ |
||
44 | 44 | * @throws OAuthException |
45 | 45 | */ |
46 | 46 | public function handle(ServerRequestInterface $request, ResourceOwnerInterface $resourceOwner, |
47 | - RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array |
|
47 | + RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array |
|
48 | 48 | { |
49 | 49 | if (is_array($client->getSupportedGrantTypes()) && !in_array('authorization_code', $client->getSupportedGrantTypes())) { |
50 | 50 | throw new OAuthException('unauthorized_client', |
@@ -28,7 +28,7 @@ |
||
28 | 28 | * @return array |
29 | 29 | */ |
30 | 30 | public function handle(ServerRequestInterface $request, ResourceOwnerInterface $resourceOwner, |
31 | - RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array; |
|
31 | + RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array; |
|
32 | 32 | |
33 | 33 | public function getDefaultResponseMode(): string; |
34 | 34 | public function isQueryResponseModeSupported(): bool; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * @return array |
41 | 41 | */ |
42 | 42 | public function handle(ServerRequestInterface $request, ResourceOwnerInterface $resourceOwner, |
43 | - RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array |
|
43 | + RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array |
|
44 | 44 | { |
45 | 45 | // TODO: Implement handle() method. |
46 | 46 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | } |
64 | 64 | |
65 | - if(!$state && $this->configurationRepository->getConfig(Config::ENFORCE_STATE)) { |
|
65 | + if (!$state && $this->configurationRepository->getConfig(Config::ENFORCE_STATE)) { |
|
66 | 66 | throw new OAuthException('invalid_request', |
67 | 67 | 'Missing a required parameter : state', |
68 | 68 | 'http://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint' |
@@ -33,7 +33,7 @@ |
||
33 | 33 | * @return array |
34 | 34 | */ |
35 | 35 | public function handle(ServerRequestInterface $request, ResourceOwnerInterface $resourceOwner, |
36 | - RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array |
|
36 | + RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array |
|
37 | 37 | { |
38 | 38 | $claims = []; |
39 | 39 |
@@ -37,12 +37,12 @@ |
||
37 | 37 | { |
38 | 38 | $claims = []; |
39 | 39 | |
40 | - if(isset($extendedResponseTypes['code'])) { |
|
40 | + if (isset($extendedResponseTypes['code'])) { |
|
41 | 41 | //c_hash |
42 | 42 | $code = $extendedResponseTypes['code']->handle()['code']; |
43 | 43 | $result['code'] = $code; |
44 | 44 | } |
45 | - if(isset($extendedResponseTypes['token'])) { |
|
45 | + if (isset($extendedResponseTypes['token'])) { |
|
46 | 46 | //at_hash |
47 | 47 | $token = $extendedResponseTypes['token']->handle()['token']; |
48 | 48 | $result['token'] = $token; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * @return array |
31 | 31 | */ |
32 | 32 | public function handle(ServerRequestInterface $request, ResourceOwnerInterface $resourceOwner, |
33 | - RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array |
|
33 | + RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array |
|
34 | 34 | { |
35 | 35 | return []; |
36 | 36 | } |
@@ -63,6 +63,6 @@ discard block |
||
63 | 63 | |
64 | 64 | public function getExtendedResponseTypes(): ?array |
65 | 65 | { |
66 | - return null; |
|
66 | + return null; |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -107,7 +107,7 @@ |
||
107 | 107 | |
108 | 108 | // todo, repository for response mode |
109 | 109 | // https://developer.okta.com/docs/api/resources/oidc#parameter-details |
110 | - /* |
|
110 | + /* |
|
111 | 111 | if (isset($data['response_mode']) && $data['response_mode'] == 'post_message') { |
112 | 112 | return $this->popupResponse(['access_token' => 'a'], $redirectUri); |
113 | 113 | } else { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * @var RegisteredClient $client |
40 | 40 | */ |
41 | - if($res = $this->verify($request, $result)) { |
|
41 | + if ($res = $this->verify($request, $result)) { |
|
42 | 42 | return $res; |
43 | 43 | } |
44 | 44 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $result = []; |
57 | 57 | |
58 | 58 | try { |
59 | - if(!$resourceOwner->isConsentGivenForClient($client)) { |
|
59 | + if (!$resourceOwner->isConsentGivenForClient($client)) { |
|
60 | 60 | throw new OAuthException('access_denied', |
61 | 61 | 'The resource owner server denied the request', |
62 | 62 | 'https://tools.ietf.org/html/rfc6749#section-4.1.1'); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @var ResponseTypeInterface $responseType |
69 | 69 | */ |
70 | 70 | foreach ($responseTypes as $responseType) { |
71 | - if($responseType->getExtendedResponseTypes()) { |
|
71 | + if ($responseType->getExtendedResponseTypes()) { |
|
72 | 72 | $extendedResponseTypes = array_merge($extendedResponseTypes, $responseType->getExtendedResponseTypes()); |
73 | 73 | } |
74 | 74 | $responseTypeNames[] = $responseType->getResponseType(); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * @var ResponseTypeInterface $responseType |
79 | 79 | */ |
80 | 80 | foreach ($responseTypes as $responseType) { |
81 | - if(!in_array($responseType->getResponseType(), $extendedResponseTypes)) { |
|
81 | + if (!in_array($responseType->getResponseType(), $extendedResponseTypes)) { |
|
82 | 82 | $extendedResponseTypes = null; |
83 | 83 | if ($responseType->getExtendedResponseTypes()) { |
84 | 84 | $extendedResponseTypeNames = array_intersect($responseType->getExtendedResponseTypes(), array_keys($responseTypes)); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $data['state'] ?? null); |
99 | 99 | } |
100 | 100 | |
101 | - if(isset($data['state'])) { |
|
101 | + if (isset($data['state'])) { |
|
102 | 102 | $result['state'] = $data['state']; |
103 | 103 | } |
104 | 104 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | if (!$scopePolicyManager->checkScope($client, $scope)) { |
259 | 259 | $supportedScopes = implode(', ', $scopePolicyManager->getSupportedScopes($client)); |
260 | 260 | throw new OAuthException('invalid_scope', |
261 | - 'Some of requested scopes are not supported. Scope supported : ' . $supportedScopes, |
|
261 | + 'Some of requested scopes are not supported. Scope supported : '.$supportedScopes, |
|
262 | 262 | 'https://tools.ietf.org/html/rfc6749#section-4.1'); |
263 | 263 | } |
264 | 264 | |
@@ -417,12 +417,12 @@ discard block |
||
417 | 417 | $responseType = $this->server->getResponseTypeRepository()->getResponseType($responseTypeName); |
418 | 418 | if (!$responseType) { |
419 | 419 | throw new OAuthException('invalid_request', |
420 | - 'Unknown response_type : ' . $responseTypeName); |
|
420 | + 'Unknown response_type : '.$responseTypeName); |
|
421 | 421 | } |
422 | 422 | |
423 | 423 | if (!$responseType->isMultiValuedResponseTypeSupported()) { |
424 | 424 | throw new OAuthException('invalid_request', |
425 | - 'Multi-valued response_type not supported with response_type : ' . $responseTypeName); |
|
425 | + 'Multi-valued response_type not supported with response_type : '.$responseTypeName); |
|
426 | 426 | } |
427 | 427 | |
428 | 428 | $responseTypes[$responseTypeName] = $responseType; |