Oihana PHP Enums

OidcAddressField uses ConstantsTrait

Enumeration of the sub-fields of the OpenID Connect `address` claim.

The address claim is a JSON object whose members are defined by OIDC Core §5.1.1. These constants standardise the member names so callers reading or building the address object avoid magic strings.

Example:

$address = $userClaims[ JwtClaim::ADDRESS ] ?? [] ;
$city    = $address[ OidcAddressField::LOCALITY ] ?? null ;

References:

  • OpenID Connect Core 1.0 §5.1.1 (Address Claim)
Tags
see
JwtClaim::ADDRESS
author

Marc Alcaraz (ekameleon)

since
1.1.0

Table of Contents

Constants

COUNTRY  : string = 'country'
`country` — Country name (OIDC Core §5.1.1).
FORMATTED  : string = 'formatted'
`formatted` — Full mailing address, formatted for display or use on a label, newline-separated (OIDC Core §5.1.1).
LOCALITY  : string = 'locality'
`locality` — City or locality (OIDC Core §5.1.1).
POSTAL_CODE  : string = 'postal_code'
`postal_code` — Zip or postal code (OIDC Core §5.1.1).
REGION  : string = 'region'
`region` — State, province, prefecture or region (OIDC Core §5.1.1).
STREET_ADDRESS  : string = 'street_address'
`street_address` — Full street address (house number, street name, etc.), may contain newlines (OIDC Core §5.1.1).

Constants

COUNTRY

`country` — Country name (OIDC Core §5.1.1).

public string COUNTRY = 'country'

FORMATTED

`formatted` — Full mailing address, formatted for display or use on a label, newline-separated (OIDC Core §5.1.1).

public string FORMATTED = 'formatted'

LOCALITY

`locality` — City or locality (OIDC Core §5.1.1).

public string LOCALITY = 'locality'

POSTAL_CODE

`postal_code` — Zip or postal code (OIDC Core §5.1.1).

public string POSTAL_CODE = 'postal_code'

REGION

`region` — State, province, prefecture or region (OIDC Core §5.1.1).

public string REGION = 'region'

STREET_ADDRESS

`street_address` — Full street address (house number, street name, etc.), may contain newlines (OIDC Core §5.1.1).

public string STREET_ADDRESS = 'street_address'
On this page

Search results