Class AddGeneratedKeyToAssertions

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, org.opensaml.profile.action.ProfileAction

    public class AddGeneratedKeyToAssertions
    extends org.opensaml.profile.action.AbstractConditionalProfileAction
    Action to add a GeneratedKey extension to every Assertion in a Response message.

    If the containing Advice is not present, it will be created.

    The ECPContext to read from is located via lookup strategy, by default beneath the outbound message context.

    Event:
    EventIds.PROCEED_EVENT_ID, EventIds.INVALID_MSG_CTX, EventIds.MESSAGE_PROC_ERROR
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.opensaml.saml.common.messaging.context.ECPContext ecpContext
      ECPContext to read from.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ECPContext> ecpContextLookupStrategy
      Strategy used to locate the ECPContext to operate on.
      private org.slf4j.Logger log
      Class logger.
      private org.opensaml.saml.saml2.core.Response response
      Response to modify.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.Response> responseLookupStrategy
      Strategy used to locate the Response to operate on.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doExecute​(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      protected boolean doPreExecute​(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      void setECPContextLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ECPContext> strategy)
      Set the strategy used to locate the ECPContext to operate on.
      void setResponseLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.Response> strategy)
      Set the strategy used to locate the Response to operate on.
      • 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, doInitialize, initialize, isDestroyed, isInitialized
      • Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent

        initialize, isInitialized
    • Field Detail

      • log

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

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ECPContext> ecpContextLookupStrategy
        Strategy used to locate the ECPContext to operate on.
      • responseLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.Response> responseLookupStrategy
        Strategy used to locate the Response to operate on.
      • ecpContext

        @Nullable
        private org.opensaml.saml.common.messaging.context.ECPContext ecpContext
        ECPContext to read from.
      • response

        @Nullable
        private org.opensaml.saml.saml2.core.Response response
        Response to modify.
    • Constructor Detail

      • AddGeneratedKeyToAssertions

        public AddGeneratedKeyToAssertions()
        Constructor.
    • Method Detail

      • setECPContextLookupStrategy

        public void setECPContextLookupStrategy​(@Nonnull
                                                Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ECPContext> strategy)
        Set the strategy used to locate the ECPContext to operate on.
        Parameters:
        strategy - lookup strategy
      • setResponseLookupStrategy

        public void setResponseLookupStrategy​(@Nonnull
                                              Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.Response> strategy)
        Set the strategy used to locate the Response to operate on.
        Parameters:
        strategy - lookup strategy
      • doPreExecute

        protected boolean doPreExecute​(@Nonnull
                                       org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
        Overrides:
        doPreExecute in class org.opensaml.profile.action.AbstractConditionalProfileAction
      • doExecute

        protected void doExecute​(@Nonnull
                                 org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
        Overrides:
        doExecute in class org.opensaml.profile.action.AbstractProfileAction