You are here

function openid_connect_claims in OpenID Connect / OAuth client 7

Returns OpenID Connect claims.

This defines the standard claims, and allows them to be extended via an alter hook.

Return value

array Set of standard claims.

See also

http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims

http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims

2 calls to openid_connect_claims()
openid_connect_claims_options in ./openid_connect.module
Returns OpenID Connect standard Claims as a Form API options array.
openid_connect_get_scopes in ./openid_connect.module
Returns scopes that have to be requested based on the configured claims.

File

./openid_connect.module, line 534
A pluggable client implementation for the OpenID Connect protocol.

Code

function openid_connect_claims() {
  $claims = array(
    'name' => array(
      'scope' => 'profile',
    ),
    'family_name' => array(
      'scope' => 'profile',
    ),
    'given_name' => array(
      'scope' => 'profile',
    ),
    'middle_name' => array(
      'scope' => 'profile',
    ),
    'nickname' => array(
      'scope' => 'profile',
    ),
    'preferred_username' => array(
      'scope' => 'profile',
    ),
    'profile' => array(
      'scope' => 'profile',
    ),
    'picture' => array(
      'scope' => 'profile',
    ),
    'website' => array(
      'scope' => 'profile',
    ),
    'gender' => array(
      'scope' => 'profile',
    ),
    'birthdate' => array(
      'scope' => 'profile',
    ),
    'zoneinfo' => array(
      'scope' => 'profile',
    ),
    'locale' => array(
      'scope' => 'profile',
    ),
    'updated_at' => array(
      'scope' => 'profile',
    ),
    'email' => array(
      'scope' => 'email',
    ),
    'email_verified' => array(
      'scope' => 'email',
    ),
    'address' => array(
      'scope' => 'address',
    ),
    'phone_number' => array(
      'scope' => 'phone',
    ),
    'phone_number_verified' => array(
      'scope' => 'phone',
    ),
  );
  drupal_alter(__FUNCTION__, $claims);
  return $claims;
}