You are here

function hook_openid_connect_claims_alter in OpenID Connect / OAuth client 8

Same name and namespace in other branches
  1. 7 openid_connect.api.php \hook_openid_connect_claims_alter()
  2. 2.x 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 20
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',
  ];
}