You are here

public function OpenIDConnectClaims::getOptions in OpenID Connect / OAuth client 8

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

Returns OpenID Connect standard Claims as a Form API options array.

Return value

array List of claims as options.

File

src/OpenIDConnectClaims.php, line 101

Class

OpenIDConnectClaims
The OpenID Connect claims service.

Namespace

Drupal\openid_connect

Code

public function getOptions() {
  $options = [];
  foreach ($this
    ->getClaims() as $claim_name => $claim) {
    $options[ucfirst($claim['scope'])][$claim_name] = $claim['title'];
  }
  return $options;
}