function oauth2_server_certificates_page in OAuth2 Server 7
Page callback: Returns the server's certificates.
Clients use this callback to get the public key certificates used to verify encrypted tokens (JWT Access token, OpenID Connect) sent by the server.
Return value
An array of X.509 certificates.
1 string reference to 'oauth2_server_certificates_page'
- oauth2_server_menu in ./
oauth2_server.module - Implements hook_menu().
File
- ./
oauth2_server.pages.inc, line 235 - Page callbacks for the OAuth2 Server module.
Code
function oauth2_server_certificates_page() {
drupal_page_is_cacheable(FALSE);
$keys = oauth2_server_get_keys();
$certificates = array();
$certificates[] = $keys['public_key'];
return drupal_json_output($certificates);
}