Class 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 Details

    • NAMESPACE

      private static final String NAMESPACE
      Attribute namespace.
      See Also:
      Constant Field Values
    • log

      private final org.slf4j.Logger log
      Class logger.
    • attrValueBuilder

      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
      Description copied from class: AbstractOutgoingSamlMessageAction
      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​(String identifier)
      Build a new subject.
      Parameters:
      identifier - subject identifier
      Returns:
      new subject
    • newAuthenticationStatement

      private AuthenticationStatement newAuthenticationStatement​(Instant authnInstant, String authnMethod, String principal)
      Build new authentication statement.
      Parameters:
      authnInstant - authentication instant
      authnMethod - authentication method
      principal - authenticated principal
      Returns:
      new authentication statement
    • newAttributeValue

      private XSString newAttributeValue​(String value)
      Build new attribute value.
      Parameters:
      value - attribute value
      Returns:
      new attribute value