\OAuth2\OpenID\StorageUserClaimsInterface

Implement this interface to specify where the OAuth2 Server should retrieve user claims for the OpenID Connect id_token.

Summary

Methods
Constants
getUserClaims()
VALID_CLAIMS
PROFILE_CLAIM_VALUES
EMAIL_CLAIM_VALUES
ADDRESS_CLAIM_VALUES
PHONE_CLAIM_VALUES
No protected methods found
N/A
No private methods found
N/A

Constants

VALID_CLAIMS

VALID_CLAIMS = 'profile email address phone'

PROFILE_CLAIM_VALUES

PROFILE_CLAIM_VALUES = 'name family_name given_name middle_name nickname preferred_username profile picture website gender birthdate zoneinfo locale updated_at'

EMAIL_CLAIM_VALUES

EMAIL_CLAIM_VALUES = 'email email_verified'

ADDRESS_CLAIM_VALUES

ADDRESS_CLAIM_VALUES = 'formatted street_address locality region postal_code country'

PHONE_CLAIM_VALUES

PHONE_CLAIM_VALUES = 'phone_number phone_number_verified'

Methods

getUserClaims()

getUserClaims(mixed  $user_id, string  $scope) : array

Return claims about the provided user id.

Groups of claims are returned based on the requested scopes. No group is required, and no claim is required.

Parameters

mixed $user_id
  • The id of the user for which claims should be returned.
string $scope
  • The requested scope. Scopes with matching claims: profile, email, address, phone.

Returns

array —
  • An array in the claim => value format.