vertx / io.vertx.ext.auth.oauth2 / KeycloakHelper

KeycloakHelper

interface KeycloakHelper

Helper class for processing Keycloak principal.

Author
Eric Zhao

Functions

accessToken

open static fun accessToken(principal: JsonObject): JsonObject

Get decoded `access_token` from the principal.

acr

open static fun acr(principal: JsonObject): String

allowedOrigins

open static fun allowedOrigins(principal: JsonObject): MutableSet<String>

authTime

open static fun authTime(principal: JsonObject): Int

email

open static fun email(principal: JsonObject): String

idToken

open static fun idToken(principal: JsonObject): JsonObject

Get decoded `id_token` from the principal.

name

open static fun name(principal: JsonObject): String

nickName

open static fun nickName(principal: JsonObject): String

parseToken

open static fun parseToken(token: String): JsonObject

Parse the token string with base64 decoder. This will only obtain the "payload" part of the token.

preferredUsername

open static fun preferredUsername(principal: JsonObject): String

rawAccessToken

open static fun rawAccessToken(principal: JsonObject): String

Get raw `access_token` string from the principal.

rawIdToken

open static fun rawIdToken(principal: JsonObject): String

Get raw `id_token` string from the principal.

sessionState

open static fun sessionState(principal: JsonObject): String