Creates a new Keycloak client instance.
Optional
config: string | KeycloakConfigA configuration object or path to a JSON config file.
Optional
authenticatedIs true if the user is authenticated, false otherwise.
Optional
flowFlow passed in init.
Optional
idThe base64 encoded ID token.
Optional
idThe parsed id token as a JavaScript object.
Optional
realmThe realm roles associated with the token.
Optional
refreshThe base64 encoded refresh token that can be used to retrieve a new token.
Optional
refreshThe parsed refresh token as a JavaScript object.
Optional
resourceThe resource roles associated with the token.
Optional
responseResponse mode passed in init (default value is 'fragment'
).
Optional
responseResponse 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.
Optional
subjectThe user id.
Optional
timeThe 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.
Optional
tokenThe base64 encoded token that can be sent in the Authorization header in requests to services.
Optional
tokenThe parsed token as a JavaScript object.
Returns the URL to the Account Management Console.
Optional
options: KeycloakAccountOptionsThe options used for creating the account URL.
Returns the URL to login form.
Optional
options: KeycloakLoginOptionsSupports same options as Keycloak#login.
Returns the URL to logout the user.
Optional
options: KeycloakLogoutOptionsLogout options.
Returns the URL to registration page.
Optional
options: KeycloakRegisterOptionsThe options used for creating the registration URL.
Called to initialize the adapter.
Initialization options.
A promise to set functions to be invoked on success or error.
Loads the user's profile.
A promise to set functions to be invoked on success or error.
Redirects to login form.
Optional
options: KeycloakLoginOptionsLogin options.
Redirects to logout.
Optional
options: KeycloakLogoutOptionsLogout options.
Optional
onOptional
onCalled if there was an error during authentication.
Optional
onOptional
onOptional
onOptional
onOptional
onOptional
onRedirects to registration form.
Optional
options: KeycloakRegisterOptionsThe 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.
Optional
minValidity: numberIf not specified, 5
is used.
A promise to set functions that can be invoked if the token is still valid, or if the token is no longer valid.
A client for the Keycloak authentication server.
See
JS adapter documentation