Package org.pac4j.oidc.client
Class AzureAd2Client
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.client.BaseClient
org.pac4j.core.client.IndirectClient
org.pac4j.oidc.client.OidcClient
org.pac4j.oidc.client.AzureAd2Client
- All Implemented Interfaces:
org.pac4j.core.client.Client
This class is the OpenID Connect client to authenticate users in Microsoft Azure AD v2.
.More information at: https://docs.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.fasterxml.jackson.databind.ObjectMapperConstanttypeRefFields inherited from class org.pac4j.core.client.IndirectClient
ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver, urlResolverFields inherited from class org.pac4j.core.client.BaseClient
logger, saveProfileInSession -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for AzureAd2Client.AzureAd2Client(AzureAd2OidcConfiguration configuration) Constructor for AzureAd2Client. -
Method Summary
Modifier and TypeMethodDescriptiongetAccessTokenFromRefreshToken(AzureAdProfile azureAdProfile) Refresh the access tokenprotected voidinternalInit(boolean forceReinit) protected org.pac4j.core.http.callback.CallbackUrlResolverMethods inherited from class org.pac4j.oidc.client.OidcClient
beforeInternalInit, notifySessionRenewal, renewUserProfileMethods inherited from class org.pac4j.core.client.IndirectClient
afterInternalInit, checkCredentials, computeFinalCallbackUrl, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCodeVerifierSessionAttributeName, getLogoutAction, getLogoutActionBuilder, getLogoutProcessor, getNonceSessionAttributeName, getRedirectionAction, getRedirectionActionBuilder, getStateSessionAttributeName, getUrlResolver, isCheckAuthenticationAttempt, processLogout, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setCheckAuthenticationAttempt, setLogoutActionBuilder, setLogoutActionBuilderIfUndefined, setLogoutProcessor, setLogoutProcessorIfUndefined, setRedirectionActionBuilder, setRedirectionActionBuilderIfUndefined, setUrlResolver, toStringMethods inherited from class org.pac4j.core.client.BaseClient
addAuthorizationGenerator, addAuthorizationGenerators, findSessionLogoutHandler, getAuthenticator, getAuthorizationGenerators, getConfig, getCredentials, getCredentialsExtractor, getCustomProperties, getLogger, getName, getProfileCreator, getProfileFactoryWhenNotAuthenticated, getSaveProfileInSession, getSaveProfileInSession, getUserProfile, internalValidateCredentials, isMultiProfile, isMultiProfile, setAuthenticator, setAuthenticatorIfUndefined, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setConfig, setCredentialsExtractor, setCredentialsExtractorIfUndefined, setCustomProperties, setMultiProfile, setName, setProfileCreator, setProfileCreatorIfUndefined, setProfileFactoryWhenNotAuthenticated, setSaveProfileInSession, validateCredentialsMethods inherited from class org.pac4j.core.util.InitializableObject
getInitialized, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds, shouldInitialize
-
Field Details
-
Constructor Details
-
AzureAd2Client
public AzureAd2Client()Constructor for AzureAd2Client.
-
AzureAd2Client
Constructor for AzureAd2Client.
- Parameters:
configuration- aAzureAd2OidcConfigurationobject
-
-
Method Details
-
internalInit
protected void internalInit(boolean forceReinit) - Overrides:
internalInitin classOidcClient
-
newDefaultCallbackUrlResolver
protected org.pac4j.core.http.callback.CallbackUrlResolver newDefaultCallbackUrlResolver()- Overrides:
newDefaultCallbackUrlResolverin classorg.pac4j.core.client.IndirectClient
-
getAccessTokenFromRefreshToken
Refresh the access token
https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow#refresh-the-access-token
- Parameters:
azureAdProfile- aAzureAdProfileobject- Returns:
- a
Stringobject
-