You are here

public function OpenIDConnectClaims::getOptions in OpenID Connect / OAuth client 2.x

Same name and namespace in other branches
  1. 8 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 97

Class

OpenIDConnectClaims
The OpenID Connect claims service.

Namespace

Drupal\openid_connect

Code

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