Package net.shibboleth.idp.cas.flow.impl
Class PrepareTicketValidationResponseAction
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.cas.flow.impl.AbstractCASProtocolAction<TicketValidationRequest,TicketValidationResponse>
net.shibboleth.idp.cas.flow.impl.PrepareTicketValidationResponseAction
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,ProfileAction
,Aware
,MessageSource
,MessageSourceAware
,Action
public class PrepareTicketValidationResponseAction
extends AbstractCASProtocolAction<TicketValidationRequest,TicketValidationResponse>
Prepares
TicketValidationResponse
for use in CAS protocol response views. Possible outcomes:
null
on successIllegalState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AttributeContext
Stored off context from request.Function used to retrieve AttributeContext.private final ConfigLookupFunction<ValidateConfiguration>
Profile configuration lookup function.Stored consented attributes from ticket.private TranscodingRule
Fallback rule that does a simple/default encode.private final org.slf4j.Logger
Class logger.private Function<ProfileRequestContext,
String> Function used to retrieve subject principal.private TicketValidationResponse
CAS response.Transcoder registry service object.private ValidateConfiguration
Profile configuration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doExecute
(ProfileRequestContext profileRequestContext) protected void
protected boolean
doPreExecute
(ProfileRequestContext profileRequestContext) protected int
encodeAttribute
(AttributeTranscoderRegistry registry, ProfileRequestContext profileRequestContext, IdPAttribute attribute, Collection<Attribute> results) Access the registry of transcoding rules to transform the input attribute into a target type.void
Sets the registry of transcoding rules to apply to encode attributes.Methods inherited from class net.shibboleth.idp.cas.flow.impl.AbstractCASProtocolAction
getCASRequest, getCASResponse, getCASService, getCASTicket, getProtocolContext, setCASRequest, setCASResponse, setCASService, setCASTicket
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 Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
attributeContextFunction
Function used to retrieve AttributeContext. -
principalLookupFunction
Function used to retrieve subject principal. -
configLookupFunction
Profile configuration lookup function. -
transcoderRegistry
Transcoder registry service object. -
defaultTranscodingRule
Fallback rule that does a simple/default encode. -
attributeContext
Stored off context from request. -
consentedAttributeIds
Stored consented attributes from ticket. -
validateConfiguration
Profile configuration. -
response
CAS response.
-
-
Constructor Details
-
PrepareTicketValidationResponseAction
public PrepareTicketValidationResponseAction()Constructor.
-
-
Method Details
-
setTranscoderRegistry
Sets the registry of transcoding rules to apply to encode attributes.- Parameters:
registry
- registry service interface
-
doInitialize
- Overrides:
doInitialize
in classAbstractInitializableComponent
- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecute
in classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecute
in classAbstractProfileAction
-
encodeAttribute
protected int encodeAttribute(@Nonnull AttributeTranscoderRegistry registry, @Nonnull ProfileRequestContext profileRequestContext, @Nonnull IdPAttribute attribute, @Nonnull @NonnullElements @Live Collection<Attribute> results) Access the registry of transcoding rules to transform the input attribute into a target type.- Parameters:
registry
- registry of transcoding rulesprofileRequestContext
- current profile request contextattribute
- input attributeresults
- collection to add results to- Returns:
- number of results added
-