Module one.jpro.platform.auth.core
Class OpenIDAuthenticationProvider
java.lang.Object
one.jpro.platform.auth.core.oauth2.OAuth2AuthenticationProvider
one.jpro.platform.auth.core.oauth2.provider.OpenIDAuthenticationProvider
- All Implemented Interfaces:
AuthenticationProvider<Credentials>
- Direct Known Subclasses:
GoogleAuthenticationProvider,KeycloakAuthenticationProvider,MicrosoftAuthenticationProvider
OpenID's authentication provider.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOpenIDAuthenticationProvider(@Nullable javafx.stage.Stage stage, @NotNull OAuth2API api) Creates a OAuth2 authentication provider.OpenIDAuthenticationProvider(@Nullable javafx.stage.Stage stage, @NotNull OAuth2Options options) Creates a OAuth2 authentication provider. -
Method Summary
Modifier and TypeMethodDescription@NotNull CompletableFuture<User> Authenticate a user with the given credentials.@NotNull CompletableFuture<String> The client sends the end-user's browser to the authorization endpoint.@NotNull OAuth2CredentialsMethods inherited from class one.jpro.platform.auth.core.oauth2.OAuth2AuthenticationProvider
authenticate, authorizeUrl, discover, getOptions, introspect, logout, refresh, revoke, userInfo
-
Constructor Details
-
OpenIDAuthenticationProvider
protected OpenIDAuthenticationProvider(@Nullable @Nullable javafx.stage.Stage stage, @NotNull @NotNull OAuth2API api) Creates a OAuth2 authentication provider.- Parameters:
stage- the JavaFX application stageapi- the OAuth2 api
-
OpenIDAuthenticationProvider
public OpenIDAuthenticationProvider(@Nullable @Nullable javafx.stage.Stage stage, @NotNull @NotNull OAuth2Options options) Creates a OAuth2 authentication provider.- Parameters:
stage- the JavaFX application stageoptions- the OAuth2 options
-
-
Method Details
-
getCredentials
-
authorizeUrl
The client sends the end-user's browser to the authorization endpoint. This endpoint is where the user signs in and grants access. End-user interaction is required.- Returns:
- a
CompletableFuturethat will complete with the authorization URL once the HTTP server is ready to handle the callback, or with an exception if an error occurs during the process.
-
authenticate
Authenticate a user with the given credentials.- Returns:
- a future that will complete with the authenticated user
-