Class ExchangeCodeForAccessToken
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.authn.AbstractAuthenticationAction
net.shibboleth.idp.plugin.authn.oidc.rp.impl.AbstractOIDCAuthenticationResponseAction
net.shibboleth.idp.plugin.authn.oidc.rp.impl.AbstractHttpOIDCAuthenticationAction<com.nimbusds.oauth2.sdk.TokenResponse>
net.shibboleth.idp.plugin.authn.oidc.rp.impl.ExchangeCodeForAccessToken
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class ExchangeCodeForAccessToken
extends AbstractHttpOIDCAuthenticationAction<com.nimbusds.oauth2.sdk.TokenResponse>
Action to exchange the authorization code in the authentication response for an OAuth access token which
contains an OIDC id_token. Once obtained, adds the token to the
AccessTokenResponseContext.- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,AuthnEventIds.AUTHN_EXCEPTION- Precondition:
ProfileRequestContext.getSubcontext(AuthenticationContext.class, false) != null
- Postcondition:
- Add the Access Token Response to the
AccessTokenResponseContext.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.Strategy used to look up theAccessTokenResponseContextto set the parameters for. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext) voidsetTokenResponseContextLookupStrategy(Function<ProfileRequestContext, AccessTokenResponseContext> strategy) Set the strategy used to look up aAccessTokenResponseContext.Methods inherited from class net.shibboleth.idp.plugin.authn.oidc.rp.impl.AbstractHttpOIDCAuthenticationAction
doInitialize, executeHttpRequest, getHttpRequestEncoderStrategy, getHttpResponseDecoderStrategy, handleRequest, setHttpClient, setHttpClientSecurityParameters, setHttpRequestEncoderStrategy, setHttpResponseDecoderStrategyMethods inherited from class net.shibboleth.idp.plugin.authn.oidc.rp.impl.AbstractOIDCAuthenticationResponseAction
doPreExecute, getAuthenticationRequest, getAuthenticationResponse, getProviderMetadataContext, setProviderMetadataLookupStrategyMethods inherited from class net.shibboleth.idp.authn.AbstractAuthenticationAction
doExecute, doPreExecute, setAuthenticationContextLookupStrategyMethods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
tokenResponseContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,AccessTokenResponseContext> tokenResponseContextLookupStrategyStrategy used to look up theAccessTokenResponseContextto set the parameters for.
-
-
Constructor Details
-
ExchangeCodeForAccessToken
public ExchangeCodeForAccessToken()Constructor.
-
-
Method Details
-
setTokenResponseContextLookupStrategy
public void setTokenResponseContextLookupStrategy(@Nonnull Function<ProfileRequestContext, AccessTokenResponseContext> strategy) Set the strategy used to look up aAccessTokenResponseContext.- Parameters:
strategy- lookup strategy
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext) - Overrides:
doExecutein classAbstractAuthenticationAction
-