You are here

public function OAuth2Controller::certificates in OAuth2 Server 8

Same name and namespace in other branches
  1. 2.0.x src/Controller/OAuth2Controller.php \Drupal\oauth2_server\Controller\OAuth2Controller::certificates()

Certificates.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match object.

\Symfony\Component\HttpFoundation\Request $request: The request object.

Return value

\Symfony\Component\HttpFoundation\JsonResponse The response object.

1 string reference to 'OAuth2Controller::certificates'
oauth2_server.routing.yml in ./oauth2_server.routing.yml
oauth2_server.routing.yml

File

src/Controller/OAuth2Controller.php, line 266

Class

OAuth2Controller
Class OAuth2 Controller.

Namespace

Drupal\oauth2_server\Controller

Code

public function certificates(RouteMatchInterface $route_match, Request $request) {
  $keys = Utility::getKeys();
  $certificates = [];
  $certificates[] = $keys['public_key'];
  return new JsonResponse($certificates);
}