Module one.jpro.platform.auth.core
Class MicrosoftAuthenticationProvider
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.MicrosoftAuthenticationProvider
- All Implemented Interfaces:
AuthenticationProvider<Credentials>
Simplified factory to create an
OAuth2AuthenticationProvider for Microsoft.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMicrosoftAuthenticationProvider(@Nullable javafx.stage.Stage stage, @NotNull String clientId, @NotNull String clientSecret, @NotNull String tenant) Create anOAuth2AuthenticationProviderfor Microsoft.MicrosoftAuthenticationProvider(@Nullable javafx.stage.Stage stage, @NotNull OAuth2Options options) Create anOAuth2AuthenticationProviderfor Microsoft. -
Method Summary
Modifier and TypeMethodDescriptiondiscover(javafx.stage.Stage stage, 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
-
COMMON_TENANT
The common tenant identifier for Microsoft OAuth2.- See Also:
-
CONSUMERS_TENANT
The consumers tenant identifier for Microsoft OAuth2.- See Also:
-
ORGANIZATIONS_TENANT
The organizations tenant identifier for Microsoft OAuth2.- See Also:
-
DEFAULT_SCOPES
-
-
Constructor Details
-
MicrosoftAuthenticationProvider
public MicrosoftAuthenticationProvider(@Nullable @Nullable javafx.stage.Stage stage, @NotNull @NotNull OAuth2Options options) Create anOAuth2AuthenticationProviderfor Microsoft.- Parameters:
stage- the JavaFX application stageoptions- the custom set of OAuth2 options which include configuration like client ID, client secret, scopes, and other OAuth2 parameters.
-
MicrosoftAuthenticationProvider
public MicrosoftAuthenticationProvider(@Nullable @Nullable javafx.stage.Stage stage, @NotNull @NotNull String clientId, @NotNull @NotNull String clientSecret, @NotNull @NotNull String tenant) Create anOAuth2AuthenticationProviderfor Microsoft.- Parameters:
stage- the JavaFX application stageclientId- the client ID issued by Microsoft for your application.clientSecret- the client secret issued by Microsoft for securing your application.tenant- the GUID or tenant ID that represents your application's directory.
-
-
Method Details
-
discover
public static CompletableFuture<OpenIDAuthenticationProvider> discover(javafx.stage.Stage stage, 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
-