Module one.jpro.platform.auth.core
Class KeycloakAuthenticationProvider
java.lang.Object
one.jpro.platform.auth.core.oauth2.OAuth2AuthenticationProvider
one.jpro.platform.auth.core.oauth2.provider.OpenIDAuthenticationProvider
one.jpro.platform.auth.core.oauth2.provider.KeycloakAuthenticationProvider
- All Implemented Interfaces:
AuthenticationProvider<Credentials>
Simplified factory to create an
OAuth2AuthenticationProvider for Keycloak.-
Constructor Summary
ConstructorsConstructorDescriptionKeycloakAuthenticationProvider(@Nullable javafx.stage.Stage stage, @NotNull OAuth2Options options) Create anOAuth2AuthenticationProviderfor Keycloak.KeycloakAuthenticationProvider(@Nullable javafx.stage.Stage stage, @Nullable OAuth2Flow flow, @NotNull org.json.JSONObject config) Create anOAuth2AuthenticationProviderfor Keycloak.KeycloakAuthenticationProvider(@Nullable javafx.stage.Stage stage, @NotNull org.json.JSONObject config) Create anOAuth2AuthenticationProviderfor Keycloak. -
Method Summary
Modifier and TypeMethodDescriptiondiscover(@Nullable javafx.stage.Stage stage, @NotNull OAuth2Options options) Create anOAuth2AuthenticationProviderfor OpenID Connect Discovery.Methods inherited from class one.jpro.platform.auth.core.oauth2.provider.OpenIDAuthenticationProvider
authenticate, authorizeUrl, getCredentialsMethods inherited from class one.jpro.platform.auth.core.oauth2.OAuth2AuthenticationProvider
authenticate, authorizeUrl, discover, getOptions, introspect, logout, refresh, revoke, userInfo
-
Constructor Details
-
KeycloakAuthenticationProvider
public KeycloakAuthenticationProvider(@Nullable @Nullable javafx.stage.Stage stage, @NotNull @NotNull OAuth2Options options) Create anOAuth2AuthenticationProviderfor Keycloak.- Parameters:
stage- the JavaFX application stageoptions- custom OAuth2 options
-
KeycloakAuthenticationProvider
public KeycloakAuthenticationProvider(@Nullable @Nullable javafx.stage.Stage stage, @NotNull @NotNull org.json.JSONObject config) Create anOAuth2AuthenticationProviderfor Keycloak.- Parameters:
stage- the JavaFX application stageconfig- the json configuration exported from Keycloak admin console
-
KeycloakAuthenticationProvider
public KeycloakAuthenticationProvider(@Nullable @Nullable javafx.stage.Stage stage, @Nullable @Nullable OAuth2Flow flow, @NotNull @NotNull org.json.JSONObject config) Create anOAuth2AuthenticationProviderfor Keycloak.- Parameters:
stage- the JavaFX application stageflow- the OAuth2 flow to use, default value isOAuth2Flow.AUTH_CODEconfig- the JSON configuration exported from Keycloak admin console
-
-
Method Details
-
discover
public static CompletableFuture<OpenIDAuthenticationProvider> discover(@Nullable @Nullable javafx.stage.Stage stage, @NotNull @NotNull OAuth2Options options) Create anOAuth2AuthenticationProviderfor OpenID Connect Discovery. The discovery will use the default site in the configuration options and attempt to load the well-known descriptor. If a site is provided, then it will be used to do the lookup.- Parameters:
stage- the JavaFX application stageoptions- custom OAuth2 options- Returns:
- a future with the instantiated
OAuth2AuthenticationProvider
-