Class SamlIdPObjectSigner


  • public class SamlIdPObjectSigner
    extends java.lang.Object
    Since:
    5.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.opensaml.xmlsec.SignatureSigningParameters buildSignatureSigningParameters​(org.opensaml.saml.saml2.metadata.RoleDescriptor descriptor, org.apereo.cas.support.saml.services.SamlRegisteredService service)
      Build signature signing parameters signature signing parameters.
      <T extends org.opensaml.saml.common.SAMLObject>
      T
      encode​(T samlObject, org.apereo.cas.support.saml.services.SamlRegisteredService service, org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, java.lang.String binding, org.opensaml.saml.saml2.core.RequestAbstractType authnRequest)
      Encode a given saml object by invoking a number of outbound security handlers on the context.
      protected org.opensaml.xmlsec.SignatureSigningConfiguration getSignatureSigningConfiguration​(org.opensaml.saml.saml2.metadata.RoleDescriptor roleDescriptor, org.apereo.cas.support.saml.services.SamlRegisteredService service)
      Gets signature signing configuration.
      protected java.security.PrivateKey getSigningPrivateKey()
      Gets signing private key.
      protected <T extends org.opensaml.saml.common.SAMLObject>
      void
      prepareEndpointURLSchemeSecurityHandler​(org.opensaml.messaging.context.MessageContext<T> outboundContext)
      Prepare endpoint url scheme security handler.
      protected <T extends org.opensaml.saml.common.SAMLObject>
      void
      prepareOutboundContext​(T samlObject, org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, org.opensaml.messaging.context.MessageContext<T> outboundContext, java.lang.String binding, org.opensaml.saml.saml2.core.RequestAbstractType authnRequest)
      Prepare outbound context.
      protected <T extends org.opensaml.saml.common.SAMLObject>
      void
      prepareSamlOutboundDestinationHandler​(org.opensaml.messaging.context.MessageContext<T> outboundContext)
      Prepare saml outbound destination handler.
      protected <T extends org.opensaml.saml.common.SAMLObject>
      void
      prepareSamlOutboundProtocolMessageSigningHandler​(org.opensaml.messaging.context.MessageContext<T> outboundContext)
      Prepare saml outbound protocol message signing handler.
      protected <T extends org.opensaml.saml.common.SAMLObject>
      void
      prepareSecurityParametersContext​(org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, org.opensaml.messaging.context.MessageContext<T> outboundContext, org.apereo.cas.support.saml.services.SamlRegisteredService service)
      Prepare security parameters context.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SamlIdPObjectSigner

        public SamlIdPObjectSigner()
    • Method Detail

      • encode

        public <T extends org.opensaml.saml.common.SAMLObject> T encode​(T samlObject,
                                                                        org.apereo.cas.support.saml.services.SamlRegisteredService service,
                                                                        org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
                                                                        javax.servlet.http.HttpServletResponse response,
                                                                        javax.servlet.http.HttpServletRequest request,
                                                                        java.lang.String binding,
                                                                        org.opensaml.saml.saml2.core.RequestAbstractType authnRequest)
                                                                 throws org.apereo.cas.support.saml.SamlException
        Encode a given saml object by invoking a number of outbound security handlers on the context.
        Type Parameters:
        T - the type parameter
        Parameters:
        samlObject - the saml object
        service - the service
        adaptor - the adaptor
        response - the response
        request - the request
        binding - the binding
        authnRequest - the authn request
        Returns:
        the t
        Throws:
        org.apereo.cas.support.saml.SamlException - the saml exception
      • prepareSamlOutboundProtocolMessageSigningHandler

        protected <T extends org.opensaml.saml.common.SAMLObject> void prepareSamlOutboundProtocolMessageSigningHandler​(org.opensaml.messaging.context.MessageContext<T> outboundContext)
                                                                                                                 throws java.lang.Exception
        Prepare saml outbound protocol message signing handler.
        Type Parameters:
        T - the type parameter
        Parameters:
        outboundContext - the outbound context
        Throws:
        java.lang.Exception - the exception
      • prepareSamlOutboundDestinationHandler

        protected <T extends org.opensaml.saml.common.SAMLObject> void prepareSamlOutboundDestinationHandler​(org.opensaml.messaging.context.MessageContext<T> outboundContext)
                                                                                                      throws java.lang.Exception
        Prepare saml outbound destination handler.
        Type Parameters:
        T - the type parameter
        Parameters:
        outboundContext - the outbound context
        Throws:
        java.lang.Exception - the exception
      • prepareEndpointURLSchemeSecurityHandler

        protected <T extends org.opensaml.saml.common.SAMLObject> void prepareEndpointURLSchemeSecurityHandler​(org.opensaml.messaging.context.MessageContext<T> outboundContext)
                                                                                                        throws java.lang.Exception
        Prepare endpoint url scheme security handler.
        Type Parameters:
        T - the type parameter
        Parameters:
        outboundContext - the outbound context
        Throws:
        java.lang.Exception - the exception
      • prepareSecurityParametersContext

        protected <T extends org.opensaml.saml.common.SAMLObject> void prepareSecurityParametersContext​(org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
                                                                                                        org.opensaml.messaging.context.MessageContext<T> outboundContext,
                                                                                                        org.apereo.cas.support.saml.services.SamlRegisteredService service)
        Prepare security parameters context.
        Type Parameters:
        T - the type parameter
        Parameters:
        adaptor - the adaptor
        outboundContext - the outbound context
        service - the service
      • prepareOutboundContext

        protected <T extends org.opensaml.saml.common.SAMLObject> void prepareOutboundContext​(T samlObject,
                                                                                              org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
                                                                                              org.opensaml.messaging.context.MessageContext<T> outboundContext,
                                                                                              java.lang.String binding,
                                                                                              org.opensaml.saml.saml2.core.RequestAbstractType authnRequest)
                                                                                       throws org.apereo.cas.support.saml.SamlException
        Prepare outbound context.
        Type Parameters:
        T - the type parameter
        Parameters:
        samlObject - the saml object
        adaptor - the adaptor
        outboundContext - the outbound context
        binding - the binding
        authnRequest - the authn request
        Throws:
        org.apereo.cas.support.saml.SamlException - the saml exception
      • buildSignatureSigningParameters

        protected org.opensaml.xmlsec.SignatureSigningParameters buildSignatureSigningParameters​(org.opensaml.saml.saml2.metadata.RoleDescriptor descriptor,
                                                                                                 org.apereo.cas.support.saml.services.SamlRegisteredService service)
        Build signature signing parameters signature signing parameters.
        Parameters:
        descriptor - the descriptor
        service - the service
        Returns:
        the signature signing parameters
      • getSignatureSigningConfiguration

        protected org.opensaml.xmlsec.SignatureSigningConfiguration getSignatureSigningConfiguration​(org.opensaml.saml.saml2.metadata.RoleDescriptor roleDescriptor,
                                                                                                     org.apereo.cas.support.saml.services.SamlRegisteredService service)
                                                                                              throws java.lang.Exception
        Gets signature signing configuration.
        Parameters:
        roleDescriptor - the role descriptor
        service - the service
        Returns:
        the signature signing configuration
        Throws:
        java.lang.Exception - the exception
      • getSigningPrivateKey

        protected java.security.PrivateKey getSigningPrivateKey()
                                                         throws java.lang.Exception
        Gets signing private key.
        Returns:
        the signing private key
        Throws:
        java.lang.Exception - the exception