Class AddResponseTypesToClientMetadata
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.profile.action.AbstractProfileAction
-
- org.opensaml.profile.action.AbstractConditionalProfileAction
-
- net.shibboleth.idp.profile.AbstractProfileAction
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCClientMetadataPopulationAction
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.AddResponseTypesToClientMetadata
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class AddResponseTypesToClientMetadata extends AbstractOIDCClientMetadataPopulationAction
An action that adds response_types to the OIDC client metadata. The default set of supported response_types as defined in the OIDC registration specification: code: if authorization_code enabled id_token: if implicit enabled token id_token: if implicit enabled code id_token: if both authorization_code, implicit enabled code token: if both authorization_code, implicit enabled code token id_token: if both authorization_code, implicit enabled
-
-
Field Summary
Fields Modifier and Type Field Description private Predicate<ProfileRequestContext>authorizationCodeFlowPredicatePredicate used to indicate whether authorization code flow is enabled.private Predicate<ProfileRequestContext>implicitFlowPredicatePredicate used to indicate whether implicit flow is enabled.private org.slf4j.LoggerlogClass logger.private Map<com.nimbusds.oauth2.sdk.ResponseType,Predicate<ProfileRequestContext>>supportedResponseTypesMap of supported response types and their corresponding predicates.
-
Constructor Summary
Constructors Constructor Description AddResponseTypesToClientMetadata()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddResponseTypeIfEnabled(Set<com.nimbusds.oauth2.sdk.ResponseType> resultTypes, com.nimbusds.oauth2.sdk.ResponseType responseType, Predicate<ProfileRequestContext> predicate, ProfileRequestContext profileRequestContext)Adds a given response type to the given set of response types, if the given predicate is true.protected voiddoExecute(ProfileRequestContext profileRequestContext)protected voiddoInitialize()Predicate<ProfileRequestContext>getAuthorizationCodeFlowEnabled()Get predicate used to indicate whether authorization code flow is enabled.Predicate<ProfileRequestContext>getImplicitFlowEnabled()Get predicate used to indicate whether hybrid flow is enabled.Map<com.nimbusds.oauth2.sdk.ResponseType,Predicate<ProfileRequestContext>>getSupportedResponseTypes()Get map of supported response types and their corresponding predicates.voidsetAuthorizationCodeFlowEnabled(Predicate<ProfileRequestContext> predicate)Set predicate used to indicate whether authorization code flow is enabled.voidsetImplicitFlowEnabled(Predicate<ProfileRequestContext> predicate)Set predicate used to indicate whether hybrid flow is enabled.voidsetSupportedResponseTypes(Map<com.nimbusds.oauth2.sdk.ResponseType,Predicate<ProfileRequestContext>> types)Set map of supported response types and their corresponding predicates.-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCClientMetadataPopulationAction
doPreExecute, getInputMetadata, getOutputMetadata, setOidcInputMetadataLookupStrategy, setOidcOutputMetadataLookupStrategy
-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
-
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, 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
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
authorizationCodeFlowPredicate
@Nonnull private Predicate<ProfileRequestContext> authorizationCodeFlowPredicate
Predicate used to indicate whether authorization code flow is enabled.
-
implicitFlowPredicate
@Nonnull private Predicate<ProfileRequestContext> implicitFlowPredicate
Predicate used to indicate whether implicit flow is enabled.
-
supportedResponseTypes
@Nonnull private Map<com.nimbusds.oauth2.sdk.ResponseType,Predicate<ProfileRequestContext>> supportedResponseTypes
Map of supported response types and their corresponding predicates.
-
-
Method Detail
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
getAuthorizationCodeFlowEnabled
public Predicate<ProfileRequestContext> getAuthorizationCodeFlowEnabled()
Get predicate used to indicate whether authorization code flow is enabled.- Returns:
- Predicate used to indicate whether authorization code flow is enabled.
-
setAuthorizationCodeFlowEnabled
public void setAuthorizationCodeFlowEnabled(Predicate<ProfileRequestContext> predicate)
Set predicate used to indicate whether authorization code flow is enabled.- Parameters:
predicate- What to set.
-
getImplicitFlowEnabled
public Predicate<ProfileRequestContext> getImplicitFlowEnabled()
Get predicate used to indicate whether hybrid flow is enabled.- Returns:
- Predicate used to indicate whether hybrid flow is enabled.
-
setImplicitFlowEnabled
public void setImplicitFlowEnabled(Predicate<ProfileRequestContext> predicate)
Set predicate used to indicate whether hybrid flow is enabled.- Parameters:
predicate- What to set.
-
setSupportedResponseTypes
public void setSupportedResponseTypes(Map<com.nimbusds.oauth2.sdk.ResponseType,Predicate<ProfileRequestContext>> types)
Set map of supported response types and their corresponding predicates.- Parameters:
types- What to set.
-
getSupportedResponseTypes
public Map<com.nimbusds.oauth2.sdk.ResponseType,Predicate<ProfileRequestContext>> getSupportedResponseTypes()
Get map of supported response types and their corresponding predicates.- Returns:
- Map of supported response types and their corresponding predicates.
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
addResponseTypeIfEnabled
protected void addResponseTypeIfEnabled(Set<com.nimbusds.oauth2.sdk.ResponseType> resultTypes, com.nimbusds.oauth2.sdk.ResponseType responseType, Predicate<ProfileRequestContext> predicate, ProfileRequestContext profileRequestContext)
Adds a given response type to the given set of response types, if the given predicate is true.- Parameters:
resultTypes- The result set where the response type is potentially added.responseType- The response type to check.predicate- The predicate used for checking.profileRequestContext- The profile context used as an input for the predicate.
-
-