Creates a new Keycloak client instance.
Optionalconfig: string | KeycloakConfigA configuration object or path to a JSON config file.
OptionalauthenticatedIs true if the user is authenticated, false otherwise.
OptionalflowFlow passed in init.
OptionalidThe base64 encoded ID token.
OptionalidThe parsed id token as a JavaScript object.
OptionalrealmThe realm roles associated with the token.
OptionalrefreshThe base64 encoded refresh token that can be used to retrieve a new token.
OptionalrefreshThe parsed refresh token as a JavaScript object.
OptionalresourceThe resource roles associated with the token.
OptionalresponseResponse mode passed in init (default value is 'fragment').
OptionalresponseResponse 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.
OptionalsubjectThe user id.
OptionaltimeThe 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.
OptionaltokenThe base64 encoded token that can be sent in the Authorization header in requests to services.
OptionaltokenThe parsed token as a JavaScript object.
Returns the URL to the Account Management Console.
Optionaloptions: KeycloakAccountOptionsThe options used for creating the account URL.
Returns the URL to login form.
Optionaloptions: KeycloakLoginOptionsSupports same options as Keycloak#login.
Returns the URL to logout the user.
Optionaloptions: KeycloakLogoutOptionsLogout options.
Returns the URL to registration page.
Optionaloptions: 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.
Optionaloptions: KeycloakLoginOptionsLogin options.
Redirects to logout.
Optionaloptions: KeycloakLogoutOptionsLogout options.
OptionalonOptionalonCalled if there was an error during authentication.
OptionalonOptionalonOptionalonOptionalonOptionalonOptionalonRedirects to registration form.
Optionaloptions: 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.
OptionalminValidity: 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