Is true if the user is authenticated, false otherwise.
Flow passed in init.
The base64 encoded ID token.
The parsed id token as a JavaScript object.
The realm roles associated with the token.
The base64 encoded refresh token that can be used to retrieve a new token.
The parsed refresh token as a JavaScript object.
The resource roles associated with the token.
Response mode passed in init (default value is 'fragment'
).
Response type sent to Keycloak with login requests. This is determined based on the flow value used during initialization, but can be overridden by setting this value.
The user id.
The estimated time difference between the browser time and the Keycloak server in seconds. This value is just an estimation, but is accurate enough when determining if a token is expired or not.
The base64 encoded token that can be sent in the Authorization header in requests to services.
The parsed token as a JavaScript object.
Redirects to the Account Management Console.
Clears authentication state, including tokens. This can be useful if the application has detected the session was expired, for example if updating token fails. Invoking this results in Keycloak#onAuthLogout callback listener being invoked.
Returns the URL to the Account Management Console.
The options used for creating the account URL.
Returns the URL to login form.
Supports same options as Keycloak#login.
Returns the URL to logout the user.
Logout options.
Returns the URL to registration page.
The options used for creating the registration URL.
Returns true if the token has the given realm role.
A realm role name.
Returns true if the token has the given role for the resource.
A role name.
If not specified, clientId
is used.
Called to initialize the adapter.
Initialization options.
A promise to set functions to be invoked on success or error.
Returns true if the token has less than minValidity
seconds left before
it expires.
If not specified, 0
is used.
Loads the user's profile.
A promise to set functions to be invoked on success or error.
Redirects to login form.
Login options.
Redirects to logout.
Logout options.
Called when a AIA has been requested by the application.
Called if there was an error during authentication.
Called if the user is logged out (will only be called if the session status iframe is enabled, or in Cordova mode).
Called if there was an error while trying to refresh the token.
Called when the token is refreshed.
Called when a user is successfully authenticated.
Called when the adapter is initialized.
Called when the access token is expired. If a refresh token is available the token can be refreshed with Keycloak#updateToken, or in cases where it's not (ie. with implicit flow) you can redirect to login screen to obtain a new access token.
Redirects to registration form.
The options used for the registration.
If the token expires within minValidity
seconds, the token is refreshed.
If the session status iframe is enabled, the session status is also
checked.
A promise to set functions that can be invoked if the token is still valid, or if the token is no longer valid.
Generated using TypeDoc
A client for the Keycloak authentication server.
Keycloak JS adapter documentation