KeycloakInstance

Signature:

{
  authenticated?: boolean;
  subject?: string;
  realmAccess?: { roles: string[] };
  resourceAccess?: string[];
  token?: string;
  tokenParsed?: {
    exp?: number;
    email?: string,
    name?: string,
    iat?: number;
    nonce?: string;
    sub?: string;
    session_state?: string;
    realm_access?: { roles: string[] };
    resource_access?: string[];
  };
  refreshToken?: string;
  refreshTokenParsed?: { nonce?: string };
  idToken?: string;
  idTokenParsed?: { nonce?: string };
  timeSkew?: number;
}

Parameters:

ParameterDescription
authenticatedIs true if the user is authenticated, false otherwise.
subjectThe user id.
realmAccessThe realm roles associated with the token.
resourceAccessThe resource roles associated with the token.
tokenThe base64 encoded token that can be sent in the Authorization header in requests to services.
tokenParsedThe parsed JWT token as a JavaScript object.
refreshTokenThe base64 encoded refresh token that can be used to retrieve a new token.
refreshTokenParsedThe parsed refresh token as a JavaScript object.
idTokenThe base64 encoded ID token.
idTokenParsedThe parsed id token as a JavaScript object.
timeSkewThe estimated time difference between the browser time and the authentication server in seconds. This value is just an estimation but is accurate enough when determining if a token is expired or not.