Class IssueRegistrationAccessToken
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.plugin.oidc.op.admin.impl.AbstractAdminApiProfileAction
net.shibboleth.idp.plugin.oidc.op.admin.impl.IssueRegistrationAccessToken
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that issues access token to be used for the OIDC dynamic registration endpoint.
On success, AccessTokenResponse is built and attached as a message for the outbound message context. Also
a proceed event is built. On error, a non-proceed event is built.
Several access control checks are made to named policies in the case that certain options are supplied.
- Since:
- 3.1.0
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,EventIds.IO_ERROR
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AccessControlServiceAccess control service.private StringThe client identifier.private Function<ProfileRequestContext,String> Lookup function for the client identifier.private StringName of access control policy governing clientId acceptance.private DataSealerData sealer for handling access token.private DurationThe token lifetime.private IdentifierGenerationStrategyThe identifier generator to use.Strategy used to locate theIdentifierGenerationStrategyto use.private StringThe token issuer.private Function<ProfileRequestContext,String> Lookup function for the token issuer.private org.slf4j.LoggerClass logger.private Map<String,MetadataPolicy> The resolved metadata policy.private Function<ProfileRequestContext,Map<String, MetadataPolicy>> Lookup function for the metadata policy.private StringThe policy identifier.private Function<ProfileRequestContext,String> Lookup function for the policy identifier.private StringName of access control policy governing policyId acceptance.private StringThe policy location.private Function<ProfileRequestContext,String> Lookup function for the policy location.private StringName of access control policy governing policyLocation acceptance.private Function<ProfileRequestContext,String> Lookup function for the flag signaling replacement use of the token.private DurationThe token lifetime.private Function<ProfileRequestContext,String> Lookup function for the token lifetime.private booleanThe xmlSafe-flag passed to the identifier generator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddAuthenticationClaims(ProfileRequestContext profileRequestContext, RegistrationClaimsSet.Builder builder) Decorate the token with authentication-related claims.private booleancheckAccess(ProfileRequestContext profileRequestContext) Check access policies.protected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidSet theAccessControlServiceto use.voidSet a lookup strategy for the client identifier.voidsetClientIdPolicyName(String name) Set an explicit policy name to apply governing clientId usage.voidsetDefaultTokenLifetime(Duration lifetime) Set the default token lifetime.voidsetIdentifierGeneratorLookupStrategy(Function<ProfileRequestContext, IdentifierGenerationStrategy> strategy) Set the strategy used to locate theIdentifierGenerationStrategyto use.voidSet a lookup strategy for the token issuer.voidsetMetadataPolicyLookupStrategy(Function<ProfileRequestContext, Map<String, MetadataPolicy>> strategy) Set a lookup strategy for the metadata policy.voidSet a lookup strategy for the relying party identifier.voidsetPolicyIdPolicyName(String name) Set an explicit policy name to apply governing policyId usage.voidSet a lookup strategy for the metadata policy location.voidSet an explicit policy name to apply governing policyLocation usage.voidSet a lookup strategy for the flag signaling registration replacement is allowed.voidsetSealer(DataSealer sealer) Set the data sealer for handling access token.voidSet a lookup strategy for the token lifetime.voidsetXmlSafeIdentifier(boolean flag) Set the xmlSafe-flag passed to the identifier generatorMethods inherited from class net.shibboleth.idp.plugin.oidc.op.admin.impl.AbstractAdminApiProfileAction
getObjectMapper, sendError, setObjectMapperMethods 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 org.slf4j.Logger logClass logger. -
dataSealer
Data sealer for handling access token. -
idGeneratorLookupStrategy
@Nonnull private Function<ProfileRequestContext,IdentifierGenerationStrategy> idGeneratorLookupStrategyStrategy used to locate theIdentifierGenerationStrategyto use. -
accessControlService
Access control service. -
policyLocationPolicyName
Name of access control policy governing policyLocation acceptance. -
policyIdPolicyName
Name of access control policy governing policyId acceptance. -
clientIdPolicyName
Name of access control policy governing clientId acceptance. -
metadataPolicyLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,Map<String, metadataPolicyLookupStrategyMetadataPolicy>> Lookup function for the metadata policy. -
tokenLifetimeLookupStrategy
Lookup function for the token lifetime. -
issuerLookupStrategy
Lookup function for the token issuer. -
policyLocationLookupStrategy
Lookup function for the policy location. -
policyIdLookupStrategy
Lookup function for the policy identifier. -
clientIdLookupStrategy
Lookup function for the client identifier. -
replacementLookupStrategy
Lookup function for the flag signaling replacement use of the token. -
idGenerator
The identifier generator to use. -
metadataPolicy
The resolved metadata policy. -
issuer
The token issuer. -
policyLocation
The policy location. -
policyId
The policy identifier. -
clientId
The client identifier. -
defaultTokenLifetime
The token lifetime. -
tokenLifetime
The token lifetime. -
xmlSafeIdentifier
private boolean xmlSafeIdentifierThe xmlSafe-flag passed to the identifier generator.
-
-
Constructor Details
-
IssueRegistrationAccessToken
public IssueRegistrationAccessToken()Constructor.
-
-
Method Details
-
setIdentifierGeneratorLookupStrategy
public void setIdentifierGeneratorLookupStrategy(@Nonnull Function<ProfileRequestContext, IdentifierGenerationStrategy> strategy) Set the strategy used to locate theIdentifierGenerationStrategyto use.- Parameters:
strategy- lookup strategy
-
setIssuerLookupStrategy
Set a lookup strategy for the token issuer.- Parameters:
strategy- lookup strategy
-
setMetadataPolicyLookupStrategy
public void setMetadataPolicyLookupStrategy(@Nonnull Function<ProfileRequestContext, Map<String, MetadataPolicy>> strategy) Set a lookup strategy for the metadata policy.- Parameters:
strategy- lookup strategy
-
setTokenLifetimeLookupStrategy
public void setTokenLifetimeLookupStrategy(@Nonnull Function<ProfileRequestContext, String> strategy) Set a lookup strategy for the token lifetime.- Parameters:
strategy- lookup strategy
-
setPolicyLocationLookupStrategy
public void setPolicyLocationLookupStrategy(@Nonnull Function<ProfileRequestContext, String> strategy) Set a lookup strategy for the metadata policy location.- Parameters:
strategy- lookup strategy
-
setPolicyIdLookupStrategy
Set a lookup strategy for the relying party identifier.- Parameters:
strategy- lookup strategy
-
setClientIdLookupStrategy
Set a lookup strategy for the client identifier.- Parameters:
strategy- lookup strategy
-
setReplacementLookupStrategy
Set a lookup strategy for the flag signaling registration replacement is allowed.- Parameters:
strategy- lookup strategy
-
setPolicyLocationPolicyName
Set an explicit policy name to apply governing policyLocation usage.- Parameters:
name- policy name
-
setPolicyIdPolicyName
Set an explicit policy name to apply governing policyId usage.- Parameters:
name- policy name
-
setClientIdPolicyName
Set an explicit policy name to apply governing clientId usage.- Parameters:
name- policy name
-
setDefaultTokenLifetime
Set the default token lifetime.- Parameters:
lifetime- token lifetime
-
setXmlSafeIdentifier
public void setXmlSafeIdentifier(boolean flag) Set the xmlSafe-flag passed to the identifier generator- Parameters:
flag- xmlSafe-flag
-
doInitialize
- Overrides:
doInitializein classAbstractAdminApiProfileAction- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractAdminApiProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
checkAccess
Check access policies.- Parameters:
profileRequestContext- current profile request context- Returns:
- true iff checks pass
-
addAuthenticationClaims
private void addAuthenticationClaims(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull RegistrationClaimsSet.Builder builder) Decorate the token with authentication-related claims.- Parameters:
profileRequestContext- profile request contextbuilder- claims set builder