function hook_openid_connect_claims_alter in OpenID Connect / OAuth client 2.x
Same name and namespace in other branches
- 8 openid_connect.api.php \hook_openid_connect_claims_alter()
- 7 openid_connect.api.php \hook_openid_connect_claims_alter()
Modify the list of claims.
Parameters
array $claims: A array of claims.
1 invocation of hook_openid_connect_claims_alter()
- OpenIDConnectClaims::getClaims in src/
OpenIDConnectClaims.php - Returns OpenID Connect claims.
File
- ./
openid_connect.api.php, line 22 - Documentation for OpenID Connect module APIs.
Code
function hook_openid_connect_claims_alter(array &$claims) {
$claims['custom_claim'] = [
'scope' => 'profile',
'title' => 'Custom Claim',
'type' => 'string',
'description' => 'A custom claim from provider',
];
}