You are here

protected function OpenIDConnectClaims::getDefaultClaims in OpenID Connect / OAuth client 8

Same name and namespace in other branches
  1. 2.x src/OpenIDConnectClaims.php \Drupal\openid_connect\OpenIDConnectClaims::getDefaultClaims()

Return default claims supported by the OpenID Connect module.

Return value

array Default claims supported by the OpenID Connect module.

1 call to OpenIDConnectClaims::getDefaultClaims()
OpenIDConnectClaims::getClaims in src/OpenIDConnectClaims.php
Returns OpenID Connect claims.

File

src/OpenIDConnectClaims.php, line 146

Class

OpenIDConnectClaims
The OpenID Connect claims service.

Namespace

Drupal\openid_connect

Code

protected function getDefaultClaims() {
  return [
    'name' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Name'),
      'type' => 'string',
      'description' => $this
        ->t('Full name'),
    ],
    'given_name' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Given name'),
      'type' => 'string',
      'description' => $this
        ->t('Given name(s) or first name(s)'),
    ],
    'family_name' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Family name'),
      'type' => 'string',
      'description' => $this
        ->t('Surname(s) or last name(s)'),
    ],
    'middle_name' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Middle name'),
      'type' => 'string',
      'description' => $this
        ->t('Middle name(s)'),
    ],
    'nickname' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Nickname'),
      'type' => 'string',
      'description' => $this
        ->t('Casual name'),
    ],
    'preferred_username' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Preferred username'),
      'type' => 'string',
      'description' => $this
        ->t('Shorthand name by which the End-User wishes to be referred to'),
    ],
    'profile' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Profile'),
      'type' => 'string',
      'description' => $this
        ->t('Profile page URL'),
    ],
    'picture' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Picture'),
      'type' => 'string',
      'description' => $this
        ->t('Profile picture URL'),
    ],
    'website' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Website'),
      'type' => 'string',
      'description' => $this
        ->t('Web page or blog URL'),
    ],
    'email' => [
      'scope' => 'email',
      'title' => $this
        ->t('Email'),
      'type' => 'string',
      'description' => $this
        ->t('Preferred e-mail address'),
    ],
    'email_verified' => [
      'scope' => 'email',
      'title' => $this
        ->t('Email verified'),
      'type' => 'boolean',
      'description' => $this
        ->t('True if the e-mail address has been verified; otherwise false'),
    ],
    'gender' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Gender'),
      'type' => 'string',
      'description' => $this
        ->t('Gender'),
    ],
    'birthdate' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Birthdate'),
      'type' => 'string',
      'description' => $this
        ->t('Birthday'),
    ],
    'zoneinfo' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Zoneinfo'),
      'type' => 'string',
      'description' => $this
        ->t('Time zone'),
    ],
    'locale' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Locale'),
      'type' => 'string',
      'description' => $this
        ->t('Locale'),
    ],
    'phone_number' => [
      'scope' => 'phone',
      'title' => $this
        ->t('Phone number'),
      'type' => 'string',
      'description' => $this
        ->t('Preferred telephone number'),
    ],
    'phone_number_verified' => [
      'scope' => 'phone',
      'title' => $this
        ->t('Phone number verified'),
      'type' => 'boolean',
      'description' => $this
        ->t('True if the phone number has been verified; otherwise false'),
    ],
    'address' => [
      'scope' => 'address',
      'title' => $this
        ->t('Address'),
      'type' => 'json',
      'description' => $this
        ->t('Preferred postal address'),
    ],
    'updated_at' => [
      'scope' => 'profile',
      'title' => $this
        ->t('Updated at'),
      'type' => 'number',
      'description' => $this
        ->t('Time the information was last updated'),
    ],
  ];
}