Class AbstractSAML2ProfileConfiguration

All Implemented Interfaces:
ConditionalProfileConfiguration, ProfileConfiguration, SAMLProfileConfiguration, SAML2ProfileConfiguration, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent
Direct Known Subclasses:
AbstractSAML2ArtifactConsumerProfileConfiguration

public abstract class AbstractSAML2ProfileConfiguration extends AbstractConditionalProfileConfiguration implements SAML2ProfileConfiguration
Base class for SAML profile configurations.
  • Field Details

    • ignoreRequestSignaturesPredicate

      @Nonnull private Predicate<ProfileRequestContext> ignoreRequestSignaturesPredicate
      Predicate used to determine if request signatures should be ignored. Default returns false.
    • signRequestsPredicate

      @Nonnull private Predicate<ProfileRequestContext> signRequestsPredicate
      Predicate used to determine if the generated request should be signed. Default returns false.
    • signResponsesPredicate

      @Nonnull private Predicate<ProfileRequestContext> signResponsesPredicate
      Predicate used to determine if the generated response should be signed. Default returns false.
    • encryptionOptionalPredicate

      @Nonnull private Predicate<ProfileRequestContext> encryptionOptionalPredicate
      Whether encryption is optional in the face of no key, etc.
    • encryptNameIDsPredicate

      @Nonnull private Predicate<ProfileRequestContext> encryptNameIDsPredicate
      Predicate used to determine if name identifiers should be encrypted.
    • messageHandlerLookupStrategy

      @Nonnull private Function<MessageContext,Function<MessageContext,Exception>> messageHandlerLookupStrategy
      Lookup function to supply a message handler function.
  • Constructor Details

    • AbstractSAML2ProfileConfiguration

      public AbstractSAML2ProfileConfiguration(@Nonnull @NotEmpty String profileId)
      Constructor.
      Parameters:
      profileId - ID of the communication profile
  • Method Details

    • isIgnoreRequestSignatures

      public boolean isIgnoreRequestSignatures(@Nullable ProfileRequestContext profileRequestContext)
      Specified by:
      isIgnoreRequestSignatures in interface SAML2ProfileConfiguration
    • setIgnoreRequestSignatures

      public void setIgnoreRequestSignatures(boolean flag)
      Set whether request signatures should be ignored.
      Parameters:
      flag - flag to set
    • setIgnoreRequestSignaturesPredicate

      public void setIgnoreRequestSignaturesPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)
      Set the predicate used to determine whether request signatures should be ignored.
      Parameters:
      predicate - condition to set
    • isSignRequests

      public boolean isSignRequests(@Nullable ProfileRequestContext profileRequestContext)
      Specified by:
      isSignRequests in interface SAMLProfileConfiguration
    • setSignRequests

      public void setSignRequests(boolean flag)
      Set whether generated requests should be signed.
      Parameters:
      flag - flag to set
    • setSignRequestsPredicate

      public void setSignRequestsPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)
      Set the predicate used to determine if generated requests should be signed.
      Parameters:
      predicate - predicate used to determine if generated requests should be signed
    • isSignResponses

      public boolean isSignResponses(@Nullable ProfileRequestContext profileRequestContext)
      Specified by:
      isSignResponses in interface SAMLProfileConfiguration
    • setSignResponses

      public void setSignResponses(boolean flag)
      Set whether generated responses should be signed.
      Parameters:
      flag - flag to set
    • setSignResponsesPredicate

      public void setSignResponsesPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)
      Set the predicate used to determine if generated responses should be signed.
      Parameters:
      predicate - predicate used to determine if generated responses should be signed
    • isEncryptionOptional

      public boolean isEncryptionOptional(@Nullable ProfileRequestContext profileRequestContext)
      Specified by:
      isEncryptionOptional in interface SAML2ProfileConfiguration
    • setEncryptionOptional

      public void setEncryptionOptional(boolean flag)
      Set whether encryption is optional in the face of a missing key, etc.
      Parameters:
      flag - flag to set
    • setEncryptionOptionalPredicate

      public void setEncryptionOptionalPredicate(@Nonnull Predicate<ProfileRequestContext> condition)
      Set a condition to determine whether encryption is optional in the face of a missing key, etc.
      Parameters:
      condition - condition to set
    • isEncryptNameIDs

      public boolean isEncryptNameIDs(@Nullable ProfileRequestContext profileRequestContext)
      Specified by:
      isEncryptNameIDs in interface SAML2ProfileConfiguration
    • setEncryptNameIDs

      public void setEncryptNameIDs(boolean flag)
      Set whether name identifiers should be encrypted.
      Parameters:
      flag - flag to set
    • setEncryptNameIDsPredicate

      public void setEncryptNameIDsPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)
      Set the predicate used to determine if name identifiers should be encrypted.
      Parameters:
      predicate - predicate used to determine if name identifiers should be encrypted
    • getMessageHandler

      @Nullable public Function<MessageContext,Exception> getMessageHandler(@Nullable MessageContext messageContext)
      Specified by:
      getMessageHandler in interface SAMLProfileConfiguration
    • setMessageHandler

      public void setMessageHandler(@Nullable Function<MessageContext,Exception> handler)
      Set a message handler for a SAML message produced or consumed by this profile.
      Parameters:
      handler - message handler
    • setMessageHandlerLookupStrategy

      public void setMessageHandlerLookupStrategy(@Nonnull Function<MessageContext,Function<MessageContext,Exception>> strategy)
      Set a lookup strategy for a message handler for a SAML message produced or consumed by this profile.
      Parameters:
      strategy - lookup strategy