Module: vertx-auth-oauth2-js/keycloak_helper

Classes

KeycloakHelper

Methods

(static) KeycloakHelper.accessToken(principal) → {Object}

Get decoded `access_token` from the principal.
Parameters:
Name Type Description
principal Object user principal
Source:
Returns:
the access token
Type
Object

(static) KeycloakHelper.acr(principal) → {string}

Parameters:
Name Type Description
principal Object
Source:
Returns:
Type
string

(static) KeycloakHelper.allowedOrigins(principal) → {Array.<string>}

Parameters:
Name Type Description
principal Object
Source:
Returns:
Type
Array.<string>

(static) KeycloakHelper.authTime(principal) → {number}

Parameters:
Name Type Description
principal Object
Source:
Returns:
Type
number

(static) KeycloakHelper.email(principal) → {string}

Parameters:
Name Type Description
principal Object
Source:
Returns:
Type
string

(static) KeycloakHelper.idToken(principal) → {Object}

Get decoded `id_token` from the principal.
Parameters:
Name Type Description
principal Object user principal
Source:
Returns:
the id token
Type
Object

(static) KeycloakHelper.name(principal) → {string}

Parameters:
Name Type Description
principal Object
Source:
Returns:
Type
string

(static) KeycloakHelper.nickName(principal) → {string}

Parameters:
Name Type Description
principal Object
Source:
Returns:
Type
string

(static) KeycloakHelper.parseToken(token) → {Object}

Parse the token string with base64 decoder. This will only obtain the "payload" part of the token.
Parameters:
Name Type Description
token string token string
Source:
Returns:
token payload json object
Type
Object

(static) KeycloakHelper.preferredUsername(principal) → {string}

Parameters:
Name Type Description
principal Object
Source:
Returns:
Type
string

(static) KeycloakHelper.rawAccessToken(principal) → {string}

Get raw `access_token` string from the principal.
Parameters:
Name Type Description
principal Object user principal
Source:
Returns:
the raw access token string
Type
string

(static) KeycloakHelper.rawIdToken(principal) → {string}

Get raw `id_token` string from the principal.
Parameters:
Name Type Description
principal Object user principal
Source:
Returns:
the raw id token string
Type
string

(static) KeycloakHelper.sessionState(principal) → {string}

Parameters:
Name Type Description
principal Object
Source:
Returns:
Type
string