SdkConfiguration
in package
implements
ConfigurableContract
uses
ConfigurableMixin
Table of Contents
Interfaces
Constants
- STRATEGIES_USING_SESSIONS : array<string|int, string> = [self::STRATEGY_REGULAR]
- STRATEGY_API : string = 'api'
- STRATEGY_MANAGEMENT_API : string = 'management'
- STRATEGY_NONE : string = 'none'
- STRATEGY_REGULAR : string = 'webapp'
Properties
- $audience : array<string|int, mixed>|null
- $backchannelLogoutCache : CacheItemPoolInterface|null
- $backchannelLogoutExpires : int
- $clientAssertionSigningAlgorithm : string
- $clientAssertionSigningKey : OpenSSLAsymmetricKey|string|null
- $clientId : string|null
- $clientSecret : string|null
- $cookieDomain : string|null
- $cookieExpires : int
- $cookiePath : string
- $cookieSameSite : string|null
- $cookieSecret : string|null
- $cookieSecure : bool
- $customDomain : string|null
- $domain : string|null
- $eventDispatcher : EventDispatcher|null
- An instance of the EventDispatcher utility.
- $eventListenerProvider : ListenerProviderInterface|null
- $httpClient : ClientInterface|null
- $httpMaxRetries : int
- $httpRequestFactory : RequestFactoryInterface|null
- $httpResponseFactory : ResponseFactoryInterface|null
- $httpStreamFactory : StreamFactoryInterface|null
- $httpTelemetry : bool
- $managementToken : string|null
- $managementTokenCache : CacheItemPoolInterface|null
- $organization : array<string|int, mixed>|null
- $persistAccessToken : bool
- $persistIdToken : bool
- $persistRefreshToken : bool
- $persistUser : bool
- $pushedAuthorizationRequest : bool
- $queryUserInfo : bool
- $redirectUri : string|null
- $responseMode : string
- $responseType : string
- $scope : array<string|int, mixed>|null
- $sessionStorage : StoreInterface|null
- $sessionStorageId : string
- $strategy : string
- $tokenAlgorithm : string
- $tokenCache : CacheItemPoolInterface|null
- $tokenCacheTtl : int
- $tokenJwksUri : string|null
- $tokenLeeway : int
- $tokenMaxAge : int|null
- $transientStorage : StoreInterface|null
- $transientStorageId : string
- $usePkce : bool
Methods
- __construct() : mixed
- SdkConfiguration Constructor.
- defaultAudience() : string
- Get the first configured audience.
- defaultOrganization() : string|null
- Get the first configured organization.
- eventDispatcher() : EventDispatcher
- Get an instance of the EventDispatcher.
- formatCustomDomain() : string|null
- Return the configured domain with protocol.
- formatDomain() : string
- Return the configured custom or tenant domain, formatted with protocol.
- formatScope() : string
- Return the configured scopes as a space-delimited string.
- getAudience() : null|array<string|int, string>
- getBackchannelLogoutCache() : CacheItemPoolInterface|null
- getBackchannelLogoutExpires() : int
- getClientAssertionSigningAlgorithm() : string
- getClientAssertionSigningKey() : OpenSSLAsymmetricKey|string|null
- getClientId() : string|null
- getClientSecret() : string|null
- getCookieDomain() : string|null
- getCookieExpires() : int
- getCookiePath() : string
- getCookieSameSite() : string|null
- getCookieSecret() : string|null
- getCookieSecure() : bool
- getCustomDomain() : string|null
- getDomain() : string|null
- getEventListenerProvider() : ListenerProviderInterface|null
- getHttpClient() : ClientInterface|null
- getHttpMaxRetries() : int
- getHttpRequestFactory() : RequestFactoryInterface|null
- getHttpResponseFactory() : ResponseFactoryInterface|null
- getHttpStreamFactory() : StreamFactoryInterface|null
- getHttpTelemetry() : bool
- getManagementToken() : string|null
- getManagementTokenCache() : CacheItemPoolInterface|null
- getOrganization() : null|array<string|int, string>
- getPersistAccessToken() : bool
- getPersistIdToken() : bool
- getPersistRefreshToken() : bool
- getPersistUser() : bool
- getPushedAuthorizationRequest() : bool
- getQueryUserInfo() : bool
- getRedirectUri() : string|null
- getResponseMode() : string
- getResponseType() : string
- getScope() : array<string|int, string>
- getSessionStorage() : StoreInterface|null
- getSessionStorageId() : string
- getStrategy() : string
- getTokenAlgorithm() : string
- getTokenCache() : CacheItemPoolInterface|null
- getTokenCacheTtl() : int
- getTokenJwksUri() : string|null
- getTokenLeeway() : int
- getTokenMaxAge() : int|null
- getTransientStorage() : StoreInterface|null
- getTransientStorageId() : string
- getUsePkce() : bool
- hasAudience() : bool
- hasBackchannelLogoutCache() : bool
- hasClientAssertionSigningAlgorithm() : bool
- hasClientAssertionSigningKey() : bool
- hasClientId() : bool
- hasClientSecret() : bool
- hasCookieDomain() : bool
- hasCookieExpires() : bool
- hasCookiePath() : bool
- hasCookieSameSite() : bool
- hasCookieSecret() : bool
- hasCookieSecure() : bool
- hasCustomDomain() : bool
- hasDomain() : bool
- hasEventListenerProvider() : bool
- hasHttpClient() : bool
- hasHttpMaxRetries() : bool
- hasHttpRequestFactory() : bool
- hasHttpResponseFactory() : bool
- hasHttpStreamFactory() : bool
- hasHttpTelemetry() : bool
- hasManagementToken() : bool
- hasManagementTokenCache() : bool
- hasOrganization() : bool
- hasPersistAccessToken() : bool
- hasPersistIdToken() : bool
- hasPersistRefreshToken() : bool
- hasPersistUser() : bool
- hasQueryUserInfo() : bool
- hasRedirectUri() : bool
- hasResponseMode() : bool
- hasResponseType() : bool
- hasScope() : bool
- hasSessionStorage() : bool
- hasSessionStorageId() : bool
- hasStrategy() : bool
- hasTokenAlgorithm() : bool
- hasTokenCache() : bool
- hasTokenCacheTtl() : bool
- hasTokenJwksUri() : bool
- hasTokenLeeway() : bool
- hasTokenMaxAge() : bool
- hasTransientStorage() : bool
- hasTransientStorageId() : bool
- hasUsePkce() : bool
- pushAudience() : null|array<string|int, string>
- pushOrganization() : null|array<string|int, string>
- pushScope() : null|array<string|int, string>
- setAudience() : self
- setBackchannelLogoutCache() : self
- setBackchannelLogoutExpires() : self
- setClientAssertionSigningAlgorithm() : self
- setClientAssertionSigningKey() : self
- setClientId() : self
- setClientSecret() : self
- setCookieDomain() : self
- setCookieExpires() : self
- setCookiePath() : self
- setCookieSameSite() : self
- setCookieSecret() : self
- setCookieSecure() : self
- setCustomDomain() : self
- setDomain() : self
- setEventListenerProvider() : self
- setHttpClient() : self
- setHttpMaxRetries() : self
- setHttpRequestFactory() : self
- setHttpResponseFactory() : self
- setHttpStreamFactory() : self
- setHttpTelemetry() : self
- setManagementToken() : self
- setManagementTokenCache() : self
- setOrganization() : self
- setPersistAccessToken() : self
- setPersistIdToken() : self
- setPersistRefreshToken() : self
- setPersistUser() : self
- setPushedAuthorizationRequest() : void
- setQueryUserInfo() : self
- setRedirectUri() : self
- setResponseMode() : self
- setResponseType() : self
- setScope() : self
- setSessionStorage() : self
- setSessionStorageId() : self
- setStrategy() : self
- setTokenAlgorithm() : self
- setTokenCache() : self
- setTokenCacheTtl() : self
- setTokenJwksUri() : self
- setTokenLeeway() : self
- setTokenMaxAge() : self
- setTransientStorage() : self
- setTransientStorageId() : self
- setUsePkce() : self
- usingStatefulness() : bool
- Returns true when the configured `strategy` is 'stateful', meaning it requires an available and configured session.
- applyConfiguration() : self
- exceptionIfNull() : void
- filterArray() : null|array<string|int, string>
- filterArrayMixed() : null|array<string|int, mixed>
- filterDomain() : string|null
- filterString() : string
- getPropertyDefaults() : array{strategy: string, domain: null, customDomain: null, clientId: null, redirectUri: null, clientSecret: null, audience: null, organization: null, usePkce: true, scope: string[], responseMode: string, responseType: string, tokenAlgorithm: string, tokenJwksUri: null, tokenMaxAge: null, tokenLeeway: int, tokenCache: null, tokenCacheTtl: int, httpClient: null, httpMaxRetries: int, httpRequestFactory: null, httpResponseFactory: null, httpStreamFactory: null, httpTelemetry: true, sessionStorage: null, sessionStorageId: string, cookieSecret: null, cookieDomain: null, cookieExpires: int, cookiePath: string, cookieSecure: false, cookieSameSite: null, persistUser: true, persistIdToken: true, persistAccessToken: true, persistRefreshToken: true, transientStorage: null, transientStorageId: string, queryUserInfo: false, managementToken: null, managementTokenCache: null, eventListenerProvider: null, clientAssertionSigningKey: null, clientAssertionSigningAlgorithm: string, pushedAuthorizationRequest: bool, backchannelLogoutCache: null, backchannelLogoutExpires: int}
- getPropertyValidators() : array<string|int, callable>
- setupStateFactories() : void
- Setup SDK factories.
- setupStateStorage() : void
- Setup SDK storage state.
- validateProperties() : void
- validateState() : void
- Setup SDK validators based on strategy type.
- validateStateApi() : void
- Run validations for an API-only usage configuration.
- validateStateManagement() : void
- Run validations for a Management-only usage configuration.
- validateStateWebApp() : void
- Run validations for a general webapp usage configuration.
Constants
STRATEGIES_USING_SESSIONS
public
array<string|int, string>
STRATEGIES_USING_SESSIONS
= [self::STRATEGY_REGULAR]
STRATEGY_API
public
string
STRATEGY_API
= 'api'
STRATEGY_MANAGEMENT_API
public
string
STRATEGY_MANAGEMENT_API
= 'management'
STRATEGY_NONE
public
string
STRATEGY_NONE
= 'none'
STRATEGY_REGULAR
public
string
STRATEGY_REGULAR
= 'webapp'
Properties
$audience
private
array<string|int, mixed>|null
$audience
= null
$backchannelLogoutCache
private
CacheItemPoolInterface|null
$backchannelLogoutCache
= null
$backchannelLogoutExpires
private
int
$backchannelLogoutExpires
= 2592000
$clientAssertionSigningAlgorithm
private
string
$clientAssertionSigningAlgorithm
= Token::ALGO_RS256
$clientAssertionSigningKey
private
OpenSSLAsymmetricKey|string|null
$clientAssertionSigningKey
= null
$clientId
private
string|null
$clientId
= null
$clientSecret
private
string|null
$clientSecret
= null
$cookieDomain
private
string|null
$cookieDomain
= null
$cookieExpires
private
int
$cookieExpires
= 0
$cookiePath
private
string
$cookiePath
= '/'
$cookieSameSite
private
string|null
$cookieSameSite
= null
$cookieSecret
private
string|null
$cookieSecret
= null
$cookieSecure
private
bool
$cookieSecure
= false
$customDomain
private
string|null
$customDomain
= null
$domain
private
string|null
$domain
= null
$eventDispatcher
An instance of the EventDispatcher utility.
private
EventDispatcher|null
$eventDispatcher
= null
$eventListenerProvider
private
ListenerProviderInterface|null
$eventListenerProvider
= null
$httpClient
private
ClientInterface|null
$httpClient
= null
$httpMaxRetries
private
int
$httpMaxRetries
= 3
$httpRequestFactory
private
RequestFactoryInterface|null
$httpRequestFactory
= null
$httpResponseFactory
private
ResponseFactoryInterface|null
$httpResponseFactory
= null
$httpStreamFactory
private
StreamFactoryInterface|null
$httpStreamFactory
= null
$httpTelemetry
private
bool
$httpTelemetry
= true
$managementToken
private
string|null
$managementToken
= null
$managementTokenCache
private
CacheItemPoolInterface|null
$managementTokenCache
= null
$organization
private
array<string|int, mixed>|null
$organization
= null
$persistAccessToken
private
bool
$persistAccessToken
= true
$persistIdToken
private
bool
$persistIdToken
= true
$persistRefreshToken
private
bool
$persistRefreshToken
= true
$persistUser
private
bool
$persistUser
= true
$pushedAuthorizationRequest
private
bool
$pushedAuthorizationRequest
= false
$queryUserInfo
private
bool
$queryUserInfo
= false
$redirectUri
private
string|null
$redirectUri
= null
$responseMode
private
string
$responseMode
= 'query'
$responseType
private
string
$responseType
= 'code'
$scope
private
array<string|int, mixed>|null
$scope
= ['openid', 'profile', 'email']
$sessionStorage
private
StoreInterface|null
$sessionStorage
= null
$sessionStorageId
private
string
$sessionStorageId
= 'auth0_session'
$strategy
private
string
$strategy
= self::STRATEGY_REGULAR
$tokenAlgorithm
private
string
$tokenAlgorithm
= Token::ALGO_RS256
$tokenCache
private
CacheItemPoolInterface|null
$tokenCache
= null
$tokenCacheTtl
private
int
$tokenCacheTtl
= 60
$tokenJwksUri
private
string|null
$tokenJwksUri
= null
$tokenLeeway
private
int
$tokenLeeway
= 60
$tokenMaxAge
private
int|null
$tokenMaxAge
= null
$transientStorage
private
StoreInterface|null
$transientStorage
= null
$transientStorageId
private
string
$transientStorageId
= 'auth0_transient'
$usePkce
private
bool
$usePkce
= true
Methods
__construct()
SdkConfiguration Constructor.
public
__construct([null|array<string|int, mixed> $configuration = null ][, string $strategy = self::STRATEGY_REGULAR ][, null|string $domain = null ][, null|string $customDomain = null ][, null|string $clientId = null ][, null|string $redirectUri = null ][, null|string $clientSecret = null ][, null|array<string|int, string> $audience = null ][, null|array<string|int, string> $organization = null ][, bool $usePkce = true ][, null|array<string|int, string> $scope = ['openid', 'profile', 'email'] ][, string $responseMode = 'query' ][, string $responseType = 'code' ][, string $tokenAlgorithm = Token::ALGO_RS256 ][, null|string $tokenJwksUri = null ][, null|int $tokenMaxAge = null ][, int $tokenLeeway = 60 ][, null|CacheItemPoolInterface $tokenCache = null ][, int $tokenCacheTtl = 60 ][, null|ClientInterface $httpClient = null ][, int $httpMaxRetries = 3 ][, null|RequestFactoryInterface $httpRequestFactory = null ][, null|ResponseFactoryInterface $httpResponseFactory = null ][, null|StreamFactoryInterface $httpStreamFactory = null ][, bool $httpTelemetry = true ][, null|StoreInterface $sessionStorage = null ][, string $sessionStorageId = 'auth0_session' ][, null|string $cookieSecret = null ][, null|string $cookieDomain = null ][, int $cookieExpires = 0 ][, string $cookiePath = '/' ][, bool $cookieSecure = false ][, null|string $cookieSameSite = null ][, bool $persistUser = true ][, bool $persistIdToken = true ][, bool $persistAccessToken = true ][, bool $persistRefreshToken = true ][, null|StoreInterface $transientStorage = null ][, string $transientStorageId = 'auth0_transient' ][, bool $queryUserInfo = false ][, null|string $managementToken = null ][, null|CacheItemPoolInterface $managementTokenCache = null ][, null|ListenerProviderInterface $eventListenerProvider = null ][, null|OpenSSLAsymmetricKey|string $clientAssertionSigningKey = null ][, string $clientAssertionSigningAlgorithm = Token::ALGO_RS256 ][, bool $pushedAuthorizationRequest = false ][, null|CacheItemPoolInterface $backchannelLogoutCache = null ][, int $backchannelLogoutExpires = 2592000 ]) : mixed
Parameters
- $configuration : null|array<string|int, mixed> = null
-
An key-value array matching this constructor's arguments. Overrides any other passed arguments with the same key name.
- $strategy : string = self::STRATEGY_REGULAR
-
Defaults to 'webapp'. Should be assigned either 'api', 'management', or 'webapp' to specify the type of application the SDK is being applied to. Determines what configuration options will be required at initialization.
- $domain : null|string = null
-
Auth0 domain for your tenant, found in your Auth0 Application settings
- $customDomain : null|string = null
-
If you have configured Auth0 to use a custom domain, configure it here
- $clientId : null|string = null
-
Client ID, found in the Auth0 Application settings
- $redirectUri : null|string = null
-
Authentication callback URI, as defined in your Auth0 Application settings
- $clientSecret : null|string = null
-
Client Secret, found in the Auth0 Application settings
- $audience : null|array<string|int, string> = null
-
One or more API identifiers, found in your Auth0 API settings. The SDK uses the first value for building links. If provided, at least one of these values must match the 'aud' claim to validate an ID Token successfully.
- $organization : null|array<string|int, string> = null
-
Allowlist containing one or more organization IDs/names. Reference your Auth0 organization settings for these values. By default, the SDK will use the first value provided when generating authorization links.
- $usePkce : bool = true
-
Defaults to true. Use PKCE (Proof Key of Code Exchange) with Authorization Code Flow requests. See https://auth0.com/docs/flows/call-your-api-using-the-authorization-code-flow-with-pkce
- $scope : null|array<string|int, string> = ['openid', 'profile', 'email']
-
One or more scopes to request for Tokens. See https://auth0.com/docs/scopes
- $responseMode : string = 'query'
-
Defaults to 'query.' Where to extract request parameters from, either 'query' for GET or 'form_post' for POST requests.
- $responseType : string = 'code'
-
Defaults to 'code.' Use 'code' for server-side flows and 'token' for application side flow.
- $tokenAlgorithm : string = Token::ALGO_RS256
-
Defaults to 'RS256'. Algorithm to use for Token verification. Expects either 'RS256' or 'HS256'.
- $tokenJwksUri : null|string = null
-
URI to the JWKS when verifying RS256 tokens
- $tokenMaxAge : null|int = null
-
The maximum window of time (in seconds) since the 'auth_time' to accept during Token validation
- $tokenLeeway : int = 60
-
Defaults to 60. Leeway (in seconds) to allow during time calculations with Token validation.
- $tokenCache : null|CacheItemPoolInterface = null
-
A PSR-6 compatible cache adapter for storing JSON Web Key Sets (JWKS)
- $tokenCacheTtl : int = 60
-
How long (in seconds) to keep a JWKS cached
- $httpClient : null|ClientInterface = null
-
A PSR-18 compatible HTTP client to use for API requests
- $httpMaxRetries : int = 3
-
When a rate-limit (429 status code) response is returned from the Auth0 API, automatically retry the request up to this many times
- $httpRequestFactory : null|RequestFactoryInterface = null
-
A PSR-17 compatible request factory to generate HTTP requests
- $httpResponseFactory : null|ResponseFactoryInterface = null
-
A PSR-17 compatible response factory to generate HTTP responses
- $httpStreamFactory : null|StreamFactoryInterface = null
-
A PSR-17 compatible stream factory to create request body streams
- $httpTelemetry : bool = true
-
Defaults to true. If true, API requests will include telemetry about the SDK and PHP runtime version to help us improve our services.
- $sessionStorage : null|StoreInterface = null
-
Defaults to use cookies. A StoreInterface-compatible class for storing Token state.
- $sessionStorageId : string = 'auth0_session'
-
Defaults to 'auth0_session'. The namespace to prefix session items under.
- $cookieSecret : null|string = null
-
The secret used to derive an encryption key (via HKDF-SHA256) for the user identity in a session cookie and to sign the transient cookies used by the login callback. Should be at least 32 bytes.
- $cookieDomain : null|string = null
-
Defaults to value of HTTP_HOST server environment information. Cookie domain, for example 'www.example.com', for use with PHP sessions and SDK cookies. To make cookies visible on all subdomains then the domain must be prefixed with a dot like '.example.com'.
- $cookieExpires : int = 0
-
Defaults to 0. How long, in seconds, before cookies expire. If set to 0 the cookie will expire at the end of the session (when the browser closes).
- $cookiePath : string = '/'
-
Defaults to '/'. Specifies path on the domain where the cookies will work. Use a single slash ('/') for all paths on the domain.
- $cookieSecure : bool = false
-
Defaults to false. Specifies whether cookies should ONLY be sent over secure connections.
- $cookieSameSite : null|string = null
-
Defaults to 'lax'. Specifies whether cookies should be restricted to first-party or same-site context.
- $persistUser : bool = true
-
Defaults to true. If true, the user data will persist in session storage.
- $persistIdToken : bool = true
-
Defaults to true. If true, the Id Token will persist in session storage.
- $persistAccessToken : bool = true
-
Defaults to true. If true, the Access Token will persist in session storage.
- $persistRefreshToken : bool = true
-
Defaults to true. If true, the Refresh Token will persist in session storage.
- $transientStorage : null|StoreInterface = null
-
Defaults to use cookies. A StoreInterface-compatible class for storing ephemeral state data, such as nonces.
- $transientStorageId : string = 'auth0_transient'
-
Defaults to 'auth0_transient'. The namespace to prefix transient items under.
- $queryUserInfo : bool = false
-
Defaults to false. If true, query the /userinfo endpoint during an authorization code exchange.
- $managementToken : null|string = null
-
An Access Token to use for Management API calls. If there isn't one specified, the SDK will attempt to get one for you using your $clientSecret.
- $managementTokenCache : null|CacheItemPoolInterface = null
-
A PSR-6 compatible cache adapter for storing generated management access tokens
- $eventListenerProvider : null|ListenerProviderInterface = null
-
A PSR-14 compatible event listener provider, for interfacing with events triggered by the SDK
- $clientAssertionSigningKey : null|OpenSSLAsymmetricKey|string = null
-
An OpenSSLAsymmetricKey (or string representing equivalent, such as a PEM) to use for signing the client assertion. If not specified, the SDK will attempt to use the $clientSecret.
- $clientAssertionSigningAlgorithm : string = Token::ALGO_RS256
-
Defaults to RS256. Algorithm to use for signing the client assertion.
- $pushedAuthorizationRequest : bool = false
-
Defaults to false. If true, the SDK will attempt to use the Pushed Authorization Requests for authentication. See https://www.rfc-editor.org/rfc/rfc9126.html#.
- $backchannelLogoutCache : null|CacheItemPoolInterface = null
-
A PSR-6 compatible cache adapter for storing backchannel logout tokens.
- $backchannelLogoutExpires : int = 2592000
-
Defaults to 2592000 (30 days). How long, in seconds, before a backchannel logout request expires from the cache. This should be greater than your $cookieExpires value, particularly if you are using rolling sessions.
Tags
defaultAudience()
Get the first configured audience.
public
defaultAudience() : string
Return values
stringdefaultOrganization()
Get the first configured organization.
public
defaultOrganization() : string|null
Return values
string|nulleventDispatcher()
Get an instance of the EventDispatcher.
public
eventDispatcher() : EventDispatcher
Return values
EventDispatcherformatCustomDomain()
Return the configured domain with protocol.
public
formatCustomDomain() : string|null
Return values
string|nullformatDomain()
Return the configured custom or tenant domain, formatted with protocol.
public
formatDomain([bool $forceTenantDomain = false ]) : string
Parameters
- $forceTenantDomain : bool = false
-
force the return of the tenant domain even if a custom domain is configured
Return values
stringformatScope()
Return the configured scopes as a space-delimited string.
public
formatScope() : string
Return values
stringgetAudience()
public
getAudience([Throwable|null $exceptionIfNull = null ]) : null|array<string|int, string>
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
null|array<string|int, string>getBackchannelLogoutCache()
public
getBackchannelLogoutCache([Throwable|null $exceptionIfNull = null ]) : CacheItemPoolInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
CacheItemPoolInterface|nullgetBackchannelLogoutExpires()
public
getBackchannelLogoutExpires() : int
Return values
intgetClientAssertionSigningAlgorithm()
public
getClientAssertionSigningAlgorithm() : string
Return values
stringgetClientAssertionSigningKey()
public
getClientAssertionSigningKey() : OpenSSLAsymmetricKey|string|null
Return values
OpenSSLAsymmetricKey|string|nullgetClientId()
public
getClientId([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|nullgetClientSecret()
public
getClientSecret([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|nullgetCookieDomain()
public
getCookieDomain() : string|null
Return values
string|nullgetCookieExpires()
public
getCookieExpires() : int
Return values
intgetCookiePath()
public
getCookiePath() : string
Return values
stringgetCookieSameSite()
public
getCookieSameSite([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|nullgetCookieSecret()
public
getCookieSecret([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|nullgetCookieSecure()
public
getCookieSecure() : bool
Return values
boolgetCustomDomain()
public
getCustomDomain([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|nullgetDomain()
public
getDomain([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|nullgetEventListenerProvider()
public
getEventListenerProvider([Throwable|null $exceptionIfNull = null ]) : ListenerProviderInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
ListenerProviderInterface|nullgetHttpClient()
public
getHttpClient([Throwable|null $exceptionIfNull = null ]) : ClientInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
ClientInterface|nullgetHttpMaxRetries()
public
getHttpMaxRetries() : int
Return values
intgetHttpRequestFactory()
public
getHttpRequestFactory([Throwable|null $exceptionIfNull = null ]) : RequestFactoryInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
RequestFactoryInterface|nullgetHttpResponseFactory()
public
getHttpResponseFactory([Throwable|null $exceptionIfNull = null ]) : ResponseFactoryInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
ResponseFactoryInterface|nullgetHttpStreamFactory()
public
getHttpStreamFactory([Throwable|null $exceptionIfNull = null ]) : StreamFactoryInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
StreamFactoryInterface|nullgetHttpTelemetry()
public
getHttpTelemetry() : bool
Return values
boolgetManagementToken()
public
getManagementToken([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|nullgetManagementTokenCache()
public
getManagementTokenCache([Throwable|null $exceptionIfNull = null ]) : CacheItemPoolInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
CacheItemPoolInterface|nullgetOrganization()
public
getOrganization([Throwable|null $exceptionIfNull = null ]) : null|array<string|int, string>
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
null|array<string|int, string> —The configured allowlist of organization IDs/names.
getPersistAccessToken()
public
getPersistAccessToken() : bool
Return values
boolgetPersistIdToken()
public
getPersistIdToken() : bool
Return values
boolgetPersistRefreshToken()
public
getPersistRefreshToken() : bool
Return values
boolgetPersistUser()
public
getPersistUser() : bool
Return values
boolgetPushedAuthorizationRequest()
public
getPushedAuthorizationRequest() : bool
Return values
boolgetQueryUserInfo()
public
getQueryUserInfo() : bool
Return values
boolgetRedirectUri()
public
getRedirectUri([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|nullgetResponseMode()
public
getResponseMode() : string
Return values
stringgetResponseType()
public
getResponseType() : string
Return values
stringgetScope()
public
getScope() : array<string|int, string>
Return values
array<string|int, string> —the array of scopes that will be requested during authentication steps
getSessionStorage()
public
getSessionStorage([Throwable|null $exceptionIfNull = null ]) : StoreInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
StoreInterface|nullgetSessionStorageId()
public
getSessionStorageId() : string
Return values
stringgetStrategy()
public
getStrategy() : string
Return values
stringgetTokenAlgorithm()
public
getTokenAlgorithm() : string
Return values
stringgetTokenCache()
public
getTokenCache([Throwable|null $exceptionIfNull = null ]) : CacheItemPoolInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
CacheItemPoolInterface|nullgetTokenCacheTtl()
public
getTokenCacheTtl() : int
Return values
intgetTokenJwksUri()
public
getTokenJwksUri([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|nullgetTokenLeeway()
public
getTokenLeeway([Throwable|null $exceptionIfNull = null ]) : int
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
intgetTokenMaxAge()
public
getTokenMaxAge([Throwable|null $exceptionIfNull = null ]) : int|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
int|nullgetTransientStorage()
public
getTransientStorage([Throwable|null $exceptionIfNull = null ]) : StoreInterface|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
StoreInterface|nullgetTransientStorageId()
public
getTransientStorageId() : string
Return values
stringgetUsePkce()
public
getUsePkce() : bool
Return values
boolhasAudience()
public
hasAudience() : bool
Return values
boolhasBackchannelLogoutCache()
public
hasBackchannelLogoutCache() : bool
Return values
boolhasClientAssertionSigningAlgorithm()
public
hasClientAssertionSigningAlgorithm() : bool
Return values
boolhasClientAssertionSigningKey()
public
hasClientAssertionSigningKey() : bool
Return values
boolhasClientId()
public
hasClientId() : bool
Return values
boolhasClientSecret()
public
hasClientSecret() : bool
Return values
boolhasCookieDomain()
public
hasCookieDomain() : bool
Return values
boolhasCookieExpires()
public
hasCookieExpires() : bool
Return values
boolhasCookiePath()
public
hasCookiePath() : bool
Return values
boolhasCookieSameSite()
public
hasCookieSameSite() : bool
Return values
boolhasCookieSecret()
public
hasCookieSecret() : bool
Return values
boolhasCookieSecure()
public
hasCookieSecure() : bool
Return values
boolhasCustomDomain()
public
hasCustomDomain() : bool
Return values
boolhasDomain()
public
hasDomain() : bool
Return values
boolhasEventListenerProvider()
public
hasEventListenerProvider() : bool
Return values
boolhasHttpClient()
public
hasHttpClient() : bool
Return values
boolhasHttpMaxRetries()
public
hasHttpMaxRetries() : bool
Return values
boolhasHttpRequestFactory()
public
hasHttpRequestFactory() : bool
Return values
boolhasHttpResponseFactory()
public
hasHttpResponseFactory() : bool
Return values
boolhasHttpStreamFactory()
public
hasHttpStreamFactory() : bool
Return values
boolhasHttpTelemetry()
public
hasHttpTelemetry() : bool
Return values
boolhasManagementToken()
public
hasManagementToken() : bool
Return values
boolhasManagementTokenCache()
public
hasManagementTokenCache() : bool
Return values
boolhasOrganization()
public
hasOrganization() : bool
Return values
boolhasPersistAccessToken()
public
hasPersistAccessToken() : bool
Return values
boolhasPersistIdToken()
public
hasPersistIdToken() : bool
Return values
boolhasPersistRefreshToken()
public
hasPersistRefreshToken() : bool
Return values
boolhasPersistUser()
public
hasPersistUser() : bool
Return values
boolhasQueryUserInfo()
public
hasQueryUserInfo() : bool
Return values
boolhasRedirectUri()
public
hasRedirectUri() : bool
Return values
boolhasResponseMode()
public
hasResponseMode() : bool
Return values
boolhasResponseType()
public
hasResponseType() : bool
Return values
boolhasScope()
public
hasScope() : bool
Return values
boolhasSessionStorage()
public
hasSessionStorage() : bool
Return values
boolhasSessionStorageId()
public
hasSessionStorageId() : bool
Return values
boolhasStrategy()
public
hasStrategy() : bool
Return values
boolhasTokenAlgorithm()
public
hasTokenAlgorithm() : bool
Return values
boolhasTokenCache()
public
hasTokenCache() : bool
Return values
boolhasTokenCacheTtl()
public
hasTokenCacheTtl() : bool
Return values
boolhasTokenJwksUri()
public
hasTokenJwksUri() : bool
Return values
boolhasTokenLeeway()
public
hasTokenLeeway() : bool
Return values
boolhasTokenMaxAge()
public
hasTokenMaxAge() : bool
Return values
boolhasTransientStorage()
public
hasTransientStorage() : bool
Return values
boolhasTransientStorageId()
public
hasTransientStorageId() : bool
Return values
boolhasUsePkce()
public
hasUsePkce() : bool
Return values
boolpushAudience()
public
pushAudience(array<string|int, string>|string $audiences) : null|array<string|int, string>
Parameters
- $audiences : array<string|int, string>|string
-
a string or array of strings to add to the API identifiers/audiences allowlist
Return values
null|array<string|int, string> —the updated allowlist
pushOrganization()
public
pushOrganization(array<string|int, string>|string $organizations) : null|array<string|int, string>
Parameters
- $organizations : array<string|int, string>|string
-
A string or array of strings representing organization IDs/names to add to the organization allowlist.
Return values
null|array<string|int, string>pushScope()
public
pushScope(array<string|int, string>|string $scopes) : null|array<string|int, string>
Parameters
- $scopes : array<string|int, string>|string
-
one or more scopes to add to the list requested during authentication steps
Return values
null|array<string|int, string>setAudience()
public
setAudience([null|array<string|int, string> $audience = null ]) : self
Parameters
- $audience : null|array<string|int, string> = null
-
an allowlist array of API identifiers/audiences
Return values
selfsetBackchannelLogoutCache()
public
setBackchannelLogoutCache([CacheItemPoolInterface|null $backchannelLogoutCache = null ]) : self
Parameters
- $backchannelLogoutCache : CacheItemPoolInterface|null = null
Return values
selfsetBackchannelLogoutExpires()
public
setBackchannelLogoutExpires([int $backchannelLogoutExpires = 2592000 ]) : self
Parameters
- $backchannelLogoutExpires : int = 2592000
Return values
selfsetClientAssertionSigningAlgorithm()
public
setClientAssertionSigningAlgorithm([string $clientAssertionSigningAlgorithm = Token::ALGO_RS256 ]) : self
Parameters
- $clientAssertionSigningAlgorithm : string = Token::ALGO_RS256
Return values
selfsetClientAssertionSigningKey()
public
setClientAssertionSigningKey(OpenSSLAsymmetricKey|string|null $clientAssertionSigningKey) : self
Parameters
- $clientAssertionSigningKey : OpenSSLAsymmetricKey|string|null
Return values
selfsetClientId()
public
setClientId([string|null $clientId = null ]) : self
Parameters
- $clientId : string|null = null
Return values
selfsetClientSecret()
public
setClientSecret([string|null $clientSecret = null ]) : self
Parameters
- $clientSecret : string|null = null
Return values
selfsetCookieDomain()
public
setCookieDomain([string|null $cookieDomain = null ]) : self
Parameters
- $cookieDomain : string|null = null
Return values
selfsetCookieExpires()
public
setCookieExpires([int $cookieExpires = 0 ]) : self
Parameters
- $cookieExpires : int = 0
Return values
selfsetCookiePath()
public
setCookiePath([string $cookiePath = '/' ]) : self
Parameters
- $cookiePath : string = '/'
Return values
selfsetCookieSameSite()
public
setCookieSameSite([string|null $cookieSameSite = null ]) : self
Parameters
- $cookieSameSite : string|null = null
Return values
selfsetCookieSecret()
public
setCookieSecret([string|null $cookieSecret = null ]) : self
Parameters
- $cookieSecret : string|null = null
Return values
selfsetCookieSecure()
public
setCookieSecure([bool $cookieSecure = false ]) : self
Parameters
- $cookieSecure : bool = false
Return values
selfsetCustomDomain()
public
setCustomDomain([string|null $customDomain = null ]) : self
Parameters
- $customDomain : string|null = null
Return values
selfsetDomain()
public
setDomain([string|null $domain = null ]) : self
Parameters
- $domain : string|null = null
Return values
selfsetEventListenerProvider()
public
setEventListenerProvider([ListenerProviderInterface|null $eventListenerProvider = null ]) : self
Parameters
- $eventListenerProvider : ListenerProviderInterface|null = null
Return values
selfsetHttpClient()
public
setHttpClient([ClientInterface|null $httpClient = null ]) : self
Parameters
- $httpClient : ClientInterface|null = null
Return values
selfsetHttpMaxRetries()
public
setHttpMaxRetries([int $httpMaxRetries = 3 ]) : self
Parameters
- $httpMaxRetries : int = 3
Return values
selfsetHttpRequestFactory()
public
setHttpRequestFactory([RequestFactoryInterface|null $httpRequestFactory = null ]) : self
Parameters
- $httpRequestFactory : RequestFactoryInterface|null = null
Return values
selfsetHttpResponseFactory()
public
setHttpResponseFactory([ResponseFactoryInterface|null $httpResponseFactory = null ]) : self
Parameters
- $httpResponseFactory : ResponseFactoryInterface|null = null
Return values
selfsetHttpStreamFactory()
public
setHttpStreamFactory([StreamFactoryInterface|null $httpStreamFactory = null ]) : self
Parameters
- $httpStreamFactory : StreamFactoryInterface|null = null
Return values
selfsetHttpTelemetry()
public
setHttpTelemetry([bool $httpTelemetry = true ]) : self
Parameters
- $httpTelemetry : bool = true
Return values
selfsetManagementToken()
public
setManagementToken([string|null $managementToken = null ]) : self
Parameters
- $managementToken : string|null = null
Return values
selfsetManagementTokenCache()
public
setManagementTokenCache([CacheItemPoolInterface|null $managementTokenCache = null ]) : self
Parameters
- $managementTokenCache : CacheItemPoolInterface|null = null
Return values
selfsetOrganization()
public
setOrganization([null|array<string|int, string> $organization = null ]) : self
Parameters
- $organization : null|array<string|int, string> = null
-
An allowlist of organizations IDs/names.
Return values
selfsetPersistAccessToken()
public
setPersistAccessToken([bool $persistAccessToken = true ]) : self
Parameters
- $persistAccessToken : bool = true
Return values
selfsetPersistIdToken()
public
setPersistIdToken([bool $persistIdToken = true ]) : self
Parameters
- $persistIdToken : bool = true
Return values
selfsetPersistRefreshToken()
public
setPersistRefreshToken([bool $persistRefreshToken = true ]) : self
Parameters
- $persistRefreshToken : bool = true
Return values
selfsetPersistUser()
public
setPersistUser([bool $persistUser = true ]) : self
Parameters
- $persistUser : bool = true
Return values
selfsetPushedAuthorizationRequest()
public
setPushedAuthorizationRequest(bool $pushedAuthorizationRequest) : void
Parameters
- $pushedAuthorizationRequest : bool
setQueryUserInfo()
public
setQueryUserInfo([bool $queryUserInfo = false ]) : self
Parameters
- $queryUserInfo : bool = false
Return values
selfsetRedirectUri()
public
setRedirectUri([string|null $redirectUri = null ]) : self
Parameters
- $redirectUri : string|null = null
Return values
selfsetResponseMode()
public
setResponseMode([string $responseMode = 'query' ]) : self
Parameters
- $responseMode : string = 'query'
Return values
selfsetResponseType()
public
setResponseType([string $responseType = 'code' ]) : self
Parameters
- $responseType : string = 'code'
Return values
selfsetScope()
public
setScope([null|array<string|int, string> $scope = ['openid', 'profile', 'email'] ]) : self
Parameters
- $scope : null|array<string|int, string> = ['openid', 'profile', 'email']
-
an array of scopes to request during authentication steps
Return values
selfsetSessionStorage()
public
setSessionStorage([StoreInterface|null $sessionStorage = null ]) : self
Parameters
- $sessionStorage : StoreInterface|null = null
Return values
selfsetSessionStorageId()
public
setSessionStorageId([string $sessionStorageId = 'auth0_session' ]) : self
Parameters
- $sessionStorageId : string = 'auth0_session'
Return values
selfsetStrategy()
public
setStrategy([string $strategy = self::STRATEGY_REGULAR ]) : self
Parameters
- $strategy : string = self::STRATEGY_REGULAR
Return values
selfsetTokenAlgorithm()
public
setTokenAlgorithm([string $tokenAlgorithm = Token::ALGO_RS256 ]) : self
Parameters
- $tokenAlgorithm : string = Token::ALGO_RS256
Return values
selfsetTokenCache()
public
setTokenCache([CacheItemPoolInterface|null $tokenCache = null ]) : self
Parameters
- $tokenCache : CacheItemPoolInterface|null = null
Return values
selfsetTokenCacheTtl()
public
setTokenCacheTtl([int $tokenCacheTtl = 60 ]) : self
Parameters
- $tokenCacheTtl : int = 60
Return values
selfsetTokenJwksUri()
public
setTokenJwksUri([string|null $tokenJwksUri = null ]) : self
Parameters
- $tokenJwksUri : string|null = null
Return values
selfsetTokenLeeway()
public
setTokenLeeway([int $tokenLeeway = 60 ]) : self
Parameters
- $tokenLeeway : int = 60
Return values
selfsetTokenMaxAge()
public
setTokenMaxAge([int|null $tokenMaxAge = null ]) : self
Parameters
- $tokenMaxAge : int|null = null
Return values
selfsetTransientStorage()
public
setTransientStorage([StoreInterface|null $transientStorage = null ]) : self
Parameters
- $transientStorage : StoreInterface|null = null
Return values
selfsetTransientStorageId()
public
setTransientStorageId([string $transientStorageId = 'auth0_transient' ]) : self
Parameters
- $transientStorageId : string = 'auth0_transient'
Return values
selfsetUsePkce()
public
setUsePkce(bool $usePkce) : self
Parameters
- $usePkce : bool
Return values
selfusingStatefulness()
Returns true when the configured `strategy` is 'stateful', meaning it requires an available and configured session.
public
usingStatefulness() : bool
Return values
boolapplyConfiguration()
private
applyConfiguration(null|array<string|int, mixed> $configuration) : self
Parameters
- $configuration : null|array<string|int, mixed>
Tags
Return values
selfexceptionIfNull()
private
exceptionIfNull(mixed $value[, null|Throwable $throwable = null ]) : void
Parameters
- $value : mixed
-
a value to compare against NULL
- $throwable : null|Throwable = null
-
Optional. A Throwable exception to raise if $value is NULL.
filterArray()
private
filterArray(null|array<string|int, string> $filtering[, bool $keepKeys = false ]) : null|array<string|int, string>
Parameters
- $filtering : null|array<string|int, string>
-
an array of strings to filter, or NULL
- $keepKeys : bool = false
-
Optional. Whether to keep array keys or reindex the array appropriately.
Tags
Return values
null|array<string|int, string>filterArrayMixed()
private
filterArrayMixed(null|array<string|int, mixed> $filtering[, bool $keepKeys = false ]) : null|array<string|int, mixed>
Parameters
- $filtering : null|array<string|int, mixed>
-
an array to filter, or NULL
- $keepKeys : bool = false
-
Optional. Whether to keep array keys or reindex the array appropriately.
Return values
null|array<string|int, mixed>filterDomain()
private
filterDomain(string $domain) : string|null
Parameters
- $domain : string
Return values
string|nullfilterString()
private
filterString(string $string) : string
Parameters
- $string : string
-
A string to apply sanitization filtering to.
Tags
Return values
stringgetPropertyDefaults()
private
getPropertyDefaults() : array{strategy: string, domain: null, customDomain: null, clientId: null, redirectUri: null, clientSecret: null, audience: null, organization: null, usePkce: true, scope: string[], responseMode: string, responseType: string, tokenAlgorithm: string, tokenJwksUri: null, tokenMaxAge: null, tokenLeeway: int, tokenCache: null, tokenCacheTtl: int, httpClient: null, httpMaxRetries: int, httpRequestFactory: null, httpResponseFactory: null, httpStreamFactory: null, httpTelemetry: true, sessionStorage: null, sessionStorageId: string, cookieSecret: null, cookieDomain: null, cookieExpires: int, cookiePath: string, cookieSecure: false, cookieSameSite: null, persistUser: true, persistIdToken: true, persistAccessToken: true, persistRefreshToken: true, transientStorage: null, transientStorageId: string, queryUserInfo: false, managementToken: null, managementTokenCache: null, eventListenerProvider: null, clientAssertionSigningKey: null, clientAssertionSigningAlgorithm: string, pushedAuthorizationRequest: bool, backchannelLogoutCache: null, backchannelLogoutExpires: int}
Return values
array{strategy: string, domain: null, customDomain: null, clientId: null, redirectUri: null, clientSecret: null, audience: null, organization: null, usePkce: true, scope: string[], responseMode: string, responseType: string, tokenAlgorithm: string, tokenJwksUri: null, tokenMaxAge: null, tokenLeeway: int, tokenCache: null, tokenCacheTtl: int, httpClient: null, httpMaxRetries: int, httpRequestFactory: null, httpResponseFactory: null, httpStreamFactory: null, httpTelemetry: true, sessionStorage: null, sessionStorageId: string, cookieSecret: null, cookieDomain: null, cookieExpires: int, cookiePath: string, cookieSecure: false, cookieSameSite: null, persistUser: true, persistIdToken: true, persistAccessToken: true, persistRefreshToken: true, transientStorage: null, transientStorageId: string, queryUserInfo: false, managementToken: null, managementTokenCache: null, eventListenerProvider: null, clientAssertionSigningKey: null, clientAssertionSigningAlgorithm: string, pushedAuthorizationRequest: bool, backchannelLogoutCache: null, backchannelLogoutExpires: int}getPropertyValidators()
private
getPropertyValidators() : array<string|int, callable>
Tags
Return values
array<string|int, callable>setupStateFactories()
Setup SDK factories.
private
setupStateFactories() : void
Tags
setupStateStorage()
Setup SDK storage state.
private
setupStateStorage() : void
validateProperties()
private
validateProperties() : void
Tags
validateState()
Setup SDK validators based on strategy type.
private
validateState([string|null $strategy = null ]) : void
Parameters
- $strategy : string|null = null
validateStateApi()
Run validations for an API-only usage configuration.
private
validateStateApi() : void
validateStateManagement()
Run validations for a Management-only usage configuration.
private
validateStateManagement() : void
validateStateWebApp()
Run validations for a general webapp usage configuration.
private
validateStateWebApp() : void