public function Jwks::handle in Simple OAuth (OAuth2) & OpenID Connect 5.x
The controller.
Return value
\Symfony\Component\HttpFoundation\Response The response.
1 string reference to 'Jwks::handle'
File
- src/
Controller/ Jwks.php, line 63
Class
- Jwks
- Controller for the User Info endpoint.
Namespace
Drupal\simple_oauth\ControllerCode
public function handle() {
if (!$this->user instanceof TokenAuthUser) {
throw new AccessDeniedHttpException('This route is only available for authenticated requests using OAuth2.');
}
if ($this->config
->get('disable_openid_connect')) {
throw new NotFoundHttpException('Not Found');
}
return JsonResponse::create((new JwksEntity())
->getKeys());
}