|
28 | 28 | use SimpleSAML\Module\oidc\Controllers\EndSessionController; |
29 | 29 | use SimpleSAML\Module\oidc\Entities\Interfaces\ClientEntityInterface; |
30 | 30 | use SimpleSAML\Module\oidc\Entities\UserEntity; |
| 31 | +use SimpleSAML\Module\oidc\Exceptions\OidcException; |
31 | 32 | use SimpleSAML\Module\oidc\Factories\AuthSimpleFactory; |
32 | 33 | use SimpleSAML\Module\oidc\Factories\Entities\UserEntityFactory; |
33 | 34 | use SimpleSAML\Module\oidc\Factories\ProcessingChainFactory; |
@@ -78,12 +79,11 @@ public function __construct( |
78 | 79 | * |
79 | 80 | * @return array |
80 | 81 | * @throws Error\AuthSource |
81 | | - * @throws Error\BadRequest |
82 | | - * @throws Error\NotFound |
83 | 82 | * @throws Exception |
84 | 83 | * @throws \SimpleSAML\Module\oidc\Server\Exceptions\OidcServerException |
85 | 84 | * @throws Error\UnserializableException |
86 | 85 | * @throws \JsonException |
| 86 | + * @throws \SimpleSAML\Module\oidc\Exceptions\OidcException |
87 | 87 | */ |
88 | 88 | public function processRequest( |
89 | 89 | ServerRequestInterface $request, |
@@ -117,13 +117,14 @@ public function processRequest( |
117 | 117 |
|
118 | 118 |
|
119 | 119 | /** |
120 | | - * @param array|null $state |
| 120 | + * @param array|null $state |
121 | 121 | * |
122 | 122 | * @return UserEntity |
123 | 123 | * @throws Error\NotFound |
124 | 124 | * @throws Exception |
125 | 125 | * @throws \JsonException |
126 | 126 | * @throws \SimpleSAML\Module\oidc\Server\Exceptions\OidcServerException |
| 127 | + * @throws \SimpleSAML\Module\oidc\Exceptions\OidcException |
127 | 128 | */ |
128 | 129 | public function getAuthenticateUser( |
129 | 130 | ?array $state, |
@@ -164,7 +165,7 @@ public function getAuthenticateUser( |
164 | 165 |
|
165 | 166 | $client = $this->clientRepository->findById((string)$state['Oidc']['RelyingPartyMetadata']['id']); |
166 | 167 | if (!$client) { |
167 | | - throw new Error\NotFound('Client not found.'); |
| 168 | + throw new OidcException('Client not found.'); |
168 | 169 | } |
169 | 170 |
|
170 | 171 | $this->addRelyingPartyAssociation($client, $user); |
|
0 commit comments