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
Modifier and TypeFieldDescriptionprotected com.fasterxml.jackson.databind.ObjectMapper
ConstanttypeRef
Fields inherited from class org.pac4j.core.client.IndirectClient
ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver, urlResolver
Fields inherited from class org.pac4j.core.client.BaseClient
logger, saveProfileInSession
-
Constructor Summary
ConstructorDescriptionConstructor for AzureAd2Client.AzureAd2Client
(AzureAd2OidcConfiguration configuration) Constructor for AzureAd2Client. -
Method Summary
Modifier and TypeMethodDescriptiongetAccessTokenFromRefreshToken
(AzureAdProfile azureAdProfile) Refresh the access tokenprotected void
internalInit
(boolean forceReinit) protected org.pac4j.core.http.callback.CallbackUrlResolver
Methods inherited from class org.pac4j.oidc.client.OidcClient
beforeInternalInit, notifySessionRenewal, renewUserProfile
Methods 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, toString
Methods 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, validateCredentials
Methods 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
- aAzureAd2OidcConfiguration
object
-
-
Method Details
-
internalInit
protected void internalInit(boolean forceReinit) - Overrides:
internalInit
in classOidcClient
-
newDefaultCallbackUrlResolver
protected org.pac4j.core.http.callback.CallbackUrlResolver newDefaultCallbackUrlResolver()- Overrides:
newDefaultCallbackUrlResolver
in 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
- aAzureAdProfile
object- Returns:
- a
String
object
-