@@ -102,8 +102,7 @@ |
||
| 102 | 102 | if($this->idTokenHint['sub'] !== $this->resourceOwner->getIdentifier()) { |
| 103 | 103 | if($this->prompt == self::PROMPT_NONE) { |
| 104 | 104 | throw new OAuthException('invalid_request'); |
| 105 | - } |
|
| 106 | - else { |
|
| 105 | + } else { |
|
| 107 | 106 | throw new OAuthException('login_required'); |
| 108 | 107 | } |
| 109 | 108 | } |
@@ -51,8 +51,8 @@ |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | public function issueIdToken(RegisteredClient $client, |
| 54 | - string $resourceOwnerIdentifier, |
|
| 55 | - array $additionalClaims = []): string |
|
| 54 | + string $resourceOwnerIdentifier, |
|
| 55 | + array $additionalClaims = []): string |
|
| 56 | 56 | { |
| 57 | 57 | $metadata = $client->getMetadata(); |
| 58 | 58 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | \DateTimeInterface $expiresAt, ?array $requestedScopes = null, ?string $redirectUri = null, |
| 25 | 25 | ?string $codeChallenge = null, ?string $codeChallengeMethod = null) |
| 26 | 26 | { |
| 27 | - parent::__construct($code, $scopes, $clientIdentifier, $resourceOwnerIdentifier, $expiresAt, $requestedScopes, $redirectUri); |
|
| 27 | + parent::__construct($code, $scopes, $clientIdentifier, $resourceOwnerIdentifier, $expiresAt, $requestedScopes, $redirectUri); |
|
| 28 | 28 | $this->codeChallenge = $codeChallenge; |
| 29 | 29 | $this->codeChallengeMethod = $codeChallengeMethod; |
| 30 | 30 | } |
@@ -121,10 +121,11 @@ |
||
| 121 | 121 | $redirectUris = $client->getMetadata()->getRedirectUris(); |
| 122 | 122 | if (empty($redirectUris)) { |
| 123 | 123 | if ($client instanceof PublicClientInterface || |
| 124 | - ($client instanceof ConfidentialClientInterface && $responseType->isRegistrationOfRedirectUriRequired())) |
|
| 125 | - throw new OAuthException('invalid_request', |
|
| 124 | + ($client instanceof ConfidentialClientInterface && $responseType->isRegistrationOfRedirectUriRequired())) { |
|
| 125 | + throw new OAuthException('invalid_request', |
|
| 126 | 126 | 'Clients using flows with redirection MUST register their redirection URI values', |
| 127 | 127 | 'https://tools.ietf.org/html/rfc7591#section-2.1'); |
| 128 | + } |
|
| 128 | 129 | } else { |
| 129 | 130 | if ($requestRedirectUri) { |
| 130 | 131 | if (!in_array($requestRedirectUri, $redirectUris)) { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | public function getClaims() : array |
| 45 | 45 | { |
| 46 | - return $this->claims; |
|
| 46 | + return $this->claims; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |