Package net.shibboleth.idp.cas.flow.impl

# Class BuildSamlValidationSuccessMessageAction

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.cas.flow.impl.AbstractCASProtocolAction<TicketValidationRequest,TicketValidationResponse>
net.shibboleth.idp.cas.flow.impl.AbstractOutgoingSamlMessageAction
net.shibboleth.idp.cas.flow.impl.BuildSamlValidationSuccessMessageAction

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `ProfileAction`, `Aware`, `MessageSource`, `MessageSourceAware`, `Action`

public class BuildSamlValidationSuccessMessageAction extends AbstractOutgoingSamlMessageAction
Creates the SAML response message for successful ticket validation at the `/samlValidate` URI.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final XMLObjectBuilder<XSString>`
`attrValueBuilder`
Attribute value node builder.
`private final String`
`entityID`
IdP entity ID used to set issuer field of generated assertions.
`private final IdentifierGenerationStrategy`
`identifierGenerationStrategy`
SAML identifier generation strategy.
`private final org.slf4j.Logger`
`log`
Class logger.
`private static final String`
`NAMESPACE`
Attribute namespace.

## Constructor Summary

Constructors
Constructor
Description
`BuildSamlValidationSuccessMessageAction(IdentifierGenerationStrategy strategy, String id)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected Response`
`buildSamlResponse(ProfileRequestContext profileRequestContext)`
Build the SAML response.
`private XSString`
`newAttributeValue(String value)`
Build new attribute value.
`private AuthenticationStatement`
`newAuthenticationStatement(Instant authnInstant, String authnMethod, String principal)`
Build new authentication statement.
`private Subject`
`newSubject(String identifier)`
Build a new subject.

### Methods inherited from class net.shibboleth.idp.cas.flow.impl.AbstractOutgoingSamlMessageAction

`doExecute, doInitialize, newSAMLObject, setOutgoingBinding`

### 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, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy`

### Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

`doPreExecute, getActivationCondition, setActivationCondition`

### Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

`doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### NAMESPACE

@Nonnull private static final String NAMESPACE
Attribute namespace.

See Also:
  - Constant Field Values

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### attrValueBuilder

@Nonnull private final XMLObjectBuilder<XSString> attrValueBuilder
Attribute value node builder.

### identifierGenerationStrategy

@Nonnull private final IdentifierGenerationStrategy identifierGenerationStrategy
SAML identifier generation strategy.

### entityID

@Nonnull private final String entityID
IdP entity ID used to set issuer field of generated assertions.

## Constructor Details

### BuildSamlValidationSuccessMessageAction

public BuildSamlValidationSuccessMessageAction(@Nonnull IdentifierGenerationStrategy strategy, @Nonnull @NotEmpty String id)
Constructor.

Parameters:
  `strategy` - SAML identifier generation strategy.
  `id` - IdP entity ID.

## Method Details

### buildSamlResponse

@Nonnull protected Response buildSamlResponse(@Nonnull ProfileRequestContext profileRequestContext) throws EventException
Build the SAML response.

Specified by:
  `buildSamlResponse` in class `AbstractOutgoingSamlMessageAction`
Parameters:
  `profileRequestContext` - profile request context
Returns:
  SAML response
Throws:
  `EventException` - to signal an event

### newSubject

@Nonnull private Subject newSubject(@Nullable String identifier)
Build a new subject.

Parameters:
  `identifier` - subject identifier
Returns:
  new subject

### newAuthenticationStatement

@Nonnull private AuthenticationStatement newAuthenticationStatement(@Nullable Instant authnInstant, @Nullable String authnMethod, @Nullable String principal)
Build new authentication statement.

Parameters:
  `authnInstant` - authentication instant
  `authnMethod` - authentication method
  `principal` - authenticated principal
Returns:
  new authentication statement

### newAttributeValue

@Nonnull private XSString newAttributeValue(@Nullable String value)
Build new attribute value.

Parameters:
  `value` - attribute value
Returns:
  new attribute value