KeycloakHelper

Helper class for processing Keycloak principal.

package

Default

Methods

__construct

__construct() 

Get decoded `access_token` from the principal.

accessToken( $arg0) : array
static

Arguments

$arg0

array

Response

array

the access token

acr

acr( $arg0) : string
static

Arguments

$arg0

array

Response

string

allowedOrigins

allowedOrigins( $arg0) : array
static

Arguments

$arg0

array

Response

array

authTime

authTime( $arg0) : integer
static

Arguments

$arg0

array

Response

integer

email

email( $arg0) : string
static

Arguments

$arg0

array

Response

string

Get decoded `id_token` from the principal.

idToken( $arg0) : array
static

Arguments

$arg0

array

Response

array

the id token

name

name( $arg0) : string
static

Arguments

$arg0

array

Response

string

nickName

nickName( $arg0) : string
static

Arguments

$arg0

array

Response

string

Parse the token string with base64 decoder.

parseToken( $arg0) : array
static

This will only obtain the "payload" part of the token.

Arguments

$arg0

string

Response

array

token payload json object

preferredUsername

preferredUsername( $arg0) : string
static

Arguments

$arg0

array

Response

string

Get raw `access_token` string from the principal.

rawAccessToken( $arg0) : string
static

Arguments

$arg0

array

Response

string

the raw access token string

Get raw `id_token` string from the principal.

rawIdToken( $arg0) : string
static

Arguments

$arg0

array

Response

string

the raw id token string

sessionState

sessionState( $arg0) : string
static

Arguments

$arg0

array

Response

string