Module one.jpro.platform.auth.core
Class GoogleAuthenticationProvider
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.GoogleAuthenticationProvider
- All Implemented Interfaces:
AuthenticationProvider<Credentials>
Simplified factory to create an
OAuth2AuthenticationProvider for Google.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGoogleAuthenticationProvider(@Nullable javafx.stage.Stage stage, @NotNull String clientId, @NotNull String clientSecret) Create anOAuth2AuthenticationProviderfor Google.GoogleAuthenticationProvider(@Nullable javafx.stage.Stage stage, @NotNull OAuth2Options options) Create anOAuth2AuthenticationProviderfor Google. -
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
-
Field Details
-
DEFAULT_SCOPES
-
-
Constructor Details
-
GoogleAuthenticationProvider
public GoogleAuthenticationProvider(@Nullable @Nullable javafx.stage.Stage stage, @NotNull @NotNull OAuth2Options options) Create anOAuth2AuthenticationProviderfor Google.- Parameters:
stage- the JavaFX application stageoptions- custom OAuth2 options
-
GoogleAuthenticationProvider
public GoogleAuthenticationProvider(@Nullable @Nullable javafx.stage.Stage stage, @NotNull @NotNull String clientId, @NotNull @NotNull String clientSecret) Create anOAuth2AuthenticationProviderfor Google.- Parameters:
stage- the JavaFX application stageclientId- the client id given to you by GoogleclientSecret- the client secret given to you by Google
-
-
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
OpenIDAuthenticationProvider
-