Class AddResponseTypeAndModeHandler
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.handler.AbstractMessageHandler
-
- net.shibboleth.idp.plugin.authn.oidc.rp.messaging.impl.AbstractOIDCAuthenticationRequestActionMessageHandler
-
- net.shibboleth.idp.plugin.authn.oidc.rp.messaging.impl.AddResponseTypeAndModeHandler
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,MessageHandler
public class AddResponseTypeAndModeHandler extends AbstractOIDCAuthenticationRequestActionMessageHandler
Action that populates the authentication request response_mode and response_type from various strategies, by default from the profile configuration.Unless explicitly set, the default response_mode for the specified response_type will be used.
-
-
Field Summary
Fields Modifier and Type Field Description private static com.nimbusds.oauth2.sdk.ResponseTypeDEFAULT_RESPONSE_TYPEThe Default response type if none is selected.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description AddResponseTypeAndModeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckProviderSupportsResponseMode(com.nimbusds.oauth2.sdk.ResponseMode responseMode)Check the OpenID Provider supports the response_mode from its metadata value response_modes_supported.private voidcheckProviderSupportsResponseType(com.nimbusds.oauth2.sdk.ResponseType responseType)Check the OpenID Provider supports the response_type from its metadata value response_types_supported.protected voiddoInvoke(MessageContext messageContext)private com.nimbusds.oauth2.sdk.ResponseModeparseResponseMode(String responseModeFromProfile)Parse the response_mode into a knownResponseMode.private com.nimbusds.oauth2.sdk.ResponseTypeparseResponseType(String responseTypeFromProfile)Parse the response_type into a knownResponseType.-
Methods inherited from class net.shibboleth.idp.plugin.authn.oidc.rp.messaging.impl.AbstractOIDCAuthenticationRequestActionMessageHandler
adapt, adapt, doPreInvoke, getAuthenticationRequest, getHttpServletRequest, getProfileConfiguration, getProviderMetadata, lookupProfileRequestContext, setHttpServletRequest, setProviderMetadataLookupStrategy, setRelyingPartyContextLookupStrategy
-
Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler
doPostInvoke, doPostInvoke, getActivationCondition, getLogPrefix, invoke, setActivationCondition
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Method Detail
-
doInvoke
protected void doInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException- Specified by:
doInvokein classAbstractMessageHandler- Throws:
MessageHandlerException
-
checkProviderSupportsResponseType
private void checkProviderSupportsResponseType(@Nonnull com.nimbusds.oauth2.sdk.ResponseType responseType) throws MessageHandlerExceptionCheck the OpenID Provider supports the response_type from its metadata value response_types_supported. Throws an exception if not.- Parameters:
responseType- the response_type to check is supported- Throws:
MessageHandlerException- if the OpenID Provider does not support the response_type
-
checkProviderSupportsResponseMode
private void checkProviderSupportsResponseMode(@Nonnull com.nimbusds.oauth2.sdk.ResponseMode responseMode) throws MessageHandlerExceptionCheck the OpenID Provider supports the response_mode from its metadata value response_modes_supported. Throws an exception if not.- Parameters:
responseMode- the response_mode to check is supported- Throws:
MessageHandlerException- if the OpenID Provider does not support the response_mode
-
parseResponseType
@Nullable private com.nimbusds.oauth2.sdk.ResponseType parseResponseType(@Nullable String responseTypeFromProfile)Parse the response_type into a knownResponseType.- Parameters:
responseTypeFromProfile- the response_type as a string- Returns:
- the parsed
ResponseType, or null if the input type is unknown
-
parseResponseMode
@Nullable private com.nimbusds.oauth2.sdk.ResponseMode parseResponseMode(@Nullable String responseModeFromProfile)Parse the response_mode into a knownResponseMode.- Parameters:
responseModeFromProfile- the response_mode as a string- Returns:
- the parsed
ResponseMode, or null if the input type is unknown
-
-