Auth0-PHP

SdkState
in package
implements ConfigurableContract uses ConfigurableMixin

FinalYes

Table of Contents

Interfaces

ConfigurableContract

Properties

$accessToken  : string|null
$accessTokenExpiration  : int|null
$accessTokenScope  : array<string|int, mixed>|null
$backchannel  : string|null
$idToken  : string|null
$refreshToken  : string|null
$user  : array<string|int, mixed>|null

Methods

__construct()  : mixed
SdkState Constructor.
getAccessToken()  : string|null
getAccessTokenExpiration()  : int|null
getAccessTokenScope()  : null|array<string|int, string>
getBackchannel()  : string|null
getIdToken()  : string|null
getRefreshToken()  : string|null
getUser()  : null|array<string|int, mixed>
hasAccessToken()  : bool
hasAccessTokenExpiration()  : bool
hasAccessTokenScope()  : bool
hasBackchannel()  : bool
hasIdToken()  : bool
hasRefreshToken()  : bool
hasUser()  : bool
pushAccessTokenScope()  : null|array<string|int, string>
setAccessToken()  : self
setAccessTokenExpiration()  : self
setAccessTokenScope()  : self
setBackchannel()  : self
setIdToken()  : self
setRefreshToken()  : self
setUser()  : self
applyConfiguration()  : self
exceptionIfNull()  : void
filterArray()  : null|array<string|int, string>
filterArrayMixed()  : null|array<string|int, mixed>
filterDomain()  : string|null
filterString()  : string
getPropertyDefaults()  : array{idToken: null, accessToken: null, accessTokenScope: null, refreshToken: null, user: null, accessTokenExpiration: null, backchannel: null}
getPropertyValidators()  : array<string|int, callable>
validateProperties()  : void

Properties

$accessToken

public string|null $accessToken = null

$accessTokenExpiration

public int|null $accessTokenExpiration = null

$accessTokenScope

public array<string|int, mixed>|null $accessTokenScope = null

$backchannel

public string|null $backchannel = null

$idToken

public string|null $idToken = null

$refreshToken

public string|null $refreshToken = null

$user

public array<string|int, mixed>|null $user = null

Methods

__construct()

SdkState Constructor.

public __construct([null|array<string|int, mixed> $configuration = null ][, null|string $idToken = null ][, null|string $accessToken = null ][, null|array<string|int, string> $accessTokenScope = null ][, null|string $refreshToken = null ][, null|array<string|int, mixed> $user = null ][, null|int $accessTokenExpiration = null ][, string|null $backchannel = null ]) : mixed
Parameters
$configuration : null|array<string|int, mixed> = null

Optional. Pass an array of parameter keys and values to define the internal state of the SDK.

$idToken : null|string = null

Optional. The id token currently in use for the session, if available.

$accessToken : null|string = null

Optional. The access token currently in use for the session, if available.

$accessTokenScope : null|array<string|int, string> = null

Optional. The scopes from the access token for the session, if available.

$refreshToken : null|string = null

Optional. The refresh token currently in use for the session, if available.

$user : null|array<string|int, mixed> = null

Optional. An array representing the user data, if available.

$accessTokenExpiration : null|int = null

Optional. When the $accessToken is expected to expire, if available.

$backchannel : string|null = null

Optional. The backchannel logout token assigned for the session, if available.

getAccessToken()

public getAccessToken([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
$exceptionIfNull : Throwable|null = null
Return values
string|null

getAccessTokenExpiration()

public getAccessTokenExpiration([Throwable|null $exceptionIfNull = null ]) : int|null
Parameters
$exceptionIfNull : Throwable|null = null
Return values
int|null

getAccessTokenScope()

public getAccessTokenScope([Throwable|null $exceptionIfNull = null ]) : null|array<string|int, string>
Parameters
$exceptionIfNull : Throwable|null = null
Return values
null|array<string|int, string>

getBackchannel()

public getBackchannel([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
$exceptionIfNull : Throwable|null = null
Return values
string|null

getIdToken()

public getIdToken([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
$exceptionIfNull : Throwable|null = null
Return values
string|null

getRefreshToken()

public getRefreshToken([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
$exceptionIfNull : Throwable|null = null
Return values
string|null

getUser()

public getUser([Throwable|null $exceptionIfNull = null ]) : null|array<string|int, mixed>
Parameters
$exceptionIfNull : Throwable|null = null
Return values
null|array<string|int, mixed>

$user an array representing user data

hasAccessToken()

public hasAccessToken() : bool
Return values
bool

hasAccessTokenExpiration()

public hasAccessTokenExpiration() : bool
Return values
bool

hasAccessTokenScope()

public hasAccessTokenScope() : bool
Return values
bool

hasBackchannel()

public hasBackchannel() : bool
Return values
bool

hasIdToken()

public hasIdToken() : bool
Return values
bool

hasRefreshToken()

public hasRefreshToken() : bool
Return values
bool

hasUser()

public hasUser() : bool
Return values
bool

pushAccessTokenScope()

public pushAccessTokenScope(array<string|int, string>|string $scopes) : null|array<string|int, string>
Parameters
$scopes : array<string|int, string>|string

a string (or array of strings) representing the scopes to add for the access token

Return values
null|array<string|int, string>

setAccessToken()

public setAccessToken([string|null $accessToken = null ]) : self
Parameters
$accessToken : string|null = null
Return values
self

setAccessTokenExpiration()

public setAccessTokenExpiration([int|null $accessTokenExpiration = null ]) : self
Parameters
$accessTokenExpiration : int|null = null
Return values
self

setAccessTokenScope()

public setAccessTokenScope(null|array<string|int, string> $accessTokenScope) : self
Parameters
$accessTokenScope : null|array<string|int, string>

an array of strings representing the scopes for the access token

Return values
self

setBackchannel()

public setBackchannel([string|null $backchannel = null ]) : self
Parameters
$backchannel : string|null = null
Return values
self

setIdToken()

public setIdToken([string|null $idToken = null ]) : self
Parameters
$idToken : string|null = null
Return values
self

setRefreshToken()

public setRefreshToken([string|null $refreshToken = null ]) : self
Parameters
$refreshToken : string|null = null
Return values
self

setUser()

public setUser(null|array<string|int, mixed> $user) : self
Parameters
$user : null|array<string|int, mixed>

an array representing user data

Return values
self

applyConfiguration()

private applyConfiguration(null|array<string|int, mixed> $configuration) : self
Parameters
$configuration : null|array<string|int, mixed>
Tags
psalm-suppress

MissingClosureParamType,MissingClosureReturnType

Return values
self

exceptionIfNull()

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
psalm-suppress

DocblockTypeContradiction,RedundantCastGivenDocblockType

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|null

filterString()

private filterString(string $string) : string
Parameters
$string : string

A string to apply sanitization filtering to.

Tags
psalm-suppress

UnusedFunctionCall

Return values
string

getPropertyDefaults()

private getPropertyDefaults() : array{idToken: null, accessToken: null, accessTokenScope: null, refreshToken: null, user: null, accessTokenExpiration: null, backchannel: null}
Return values
array{idToken: null, accessToken: null, accessTokenScope: null, refreshToken: null, user: null, accessTokenExpiration: null, backchannel: null}

getPropertyValidators()

private getPropertyValidators() : array<string|int, callable>
Tags
psalm-suppress

MissingClosureParamType

Return values
array<string|int, callable>

validateProperties()

private validateProperties() : void
Tags
psalm-suppress

MissingClosureParamType,MissingClosureReturnType

On this page

Search results