Class DefaultSamlIdPObjectSigner
java.lang.Object
org.apereo.cas.support.saml.web.idp.profile.builders.enc.DefaultSamlIdPObjectSigner
- All Implemented Interfaces:
SamlIdPObjectSigner
This is
DefaultSamlIdPObjectSigner.- Since:
- 5.0.0
-
Field Summary
Fields inherited from interface org.apereo.cas.support.saml.web.idp.profile.builders.enc.SamlIdPObjectSigner
DEFAULT_BEAN_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.opensaml.xmlsec.SignatureSigningParametersbuildSignatureSigningParameters(org.opensaml.saml.saml2.metadata.RoleDescriptor descriptor, org.apereo.cas.support.saml.services.SamlRegisteredService service) Build signature signing parameters signature signing parameters.protected org.opensaml.xmlsec.impl.BasicSignatureSigningConfigurationconfigureSignatureSigningSecurityConfiguration(org.apereo.cas.support.saml.services.SamlRegisteredService service) <T extends org.opensaml.saml.common.SAMLObject>
Tencode(T samlObject, org.apereo.cas.support.saml.services.SamlRegisteredService service, org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, String binding, org.opensaml.saml.saml2.core.RequestAbstractType authnRequest, org.opensaml.messaging.context.MessageContext messageContext) Encode a given saml object by invoking a number of outbound security handlers on the context.protected org.opensaml.security.credential.AbstractCredentialgetResolvedSigningCredential(org.opensaml.security.credential.Credential credential, PrivateKey privateKey, org.apereo.cas.support.saml.services.SamlRegisteredService service) protected org.opensaml.xmlsec.SignatureSigningConfigurationgetSignatureSigningConfiguration(org.apereo.cas.support.saml.services.SamlRegisteredService service) Gets signature signing configuration.protected PrivateKeygetSigningPrivateKey(org.apereo.cas.support.saml.services.SamlRegisteredService registeredService) Gets signing private key.protected voidprepareEndpointURLSchemeSecurityHandler(org.opensaml.messaging.context.MessageContext outboundContext) Prepare endpoint url scheme security handler.protected <T extends org.opensaml.saml.common.SAMLObject>
voidprepareOutboundContext(T samlObject, org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, org.opensaml.messaging.context.MessageContext outboundContext, String binding, org.opensaml.saml.saml2.core.RequestAbstractType authnRequest) Prepare outbound context.protected voidprepareSamlOutboundDestinationHandler(org.opensaml.messaging.context.MessageContext outboundContext) Prepare saml outbound destination handler.protected voidprepareSamlOutboundProtocolMessageSigningHandler(org.opensaml.messaging.context.MessageContext outboundContext) Prepare saml outbound protocol message signing handler.protected voidprepareSecurityParametersContext(org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, org.opensaml.messaging.context.MessageContext 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, waitMethods inherited from interface org.apereo.cas.support.saml.web.idp.profile.builders.enc.SamlIdPObjectSigner
getSamlIdPMetadataResolver
-
Constructor Details
-
DefaultSamlIdPObjectSigner
public DefaultSamlIdPObjectSigner()
-
-
Method Details
-
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, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, String binding, org.opensaml.saml.saml2.core.RequestAbstractType authnRequest, org.opensaml.messaging.context.MessageContext messageContext) throws Exception Description copied from interface:SamlIdPObjectSignerEncode a given saml object by invoking a number of outbound security handlers on the context.- Specified by:
encodein interfaceSamlIdPObjectSigner- Type Parameters:
T- the type parameter- Parameters:
samlObject- the saml objectservice- the serviceadaptor- the adaptorresponse- the responserequest- the requestbinding- the bindingauthnRequest- the authn requestmessageContext- the message context- Returns:
- the saml object
- Throws:
Exception- the saml exception
-
prepareSamlOutboundProtocolMessageSigningHandler
protected void prepareSamlOutboundProtocolMessageSigningHandler(org.opensaml.messaging.context.MessageContext outboundContext) throws Exception Prepare saml outbound protocol message signing handler.- Parameters:
outboundContext- the outbound context- Throws:
Exception- the exception
-
prepareSamlOutboundDestinationHandler
protected void prepareSamlOutboundDestinationHandler(org.opensaml.messaging.context.MessageContext outboundContext) throws Exception Prepare saml outbound destination handler.- Parameters:
outboundContext- the outbound context- Throws:
Exception- the exception
-
prepareEndpointURLSchemeSecurityHandler
protected void prepareEndpointURLSchemeSecurityHandler(org.opensaml.messaging.context.MessageContext outboundContext) throws Exception Prepare endpoint url scheme security handler.- Parameters:
outboundContext- the outbound context- Throws:
Exception- the exception
-
prepareSecurityParametersContext
protected void prepareSecurityParametersContext(org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, org.opensaml.messaging.context.MessageContext outboundContext, org.apereo.cas.support.saml.services.SamlRegisteredService service) Prepare security parameters context.- Parameters:
adaptor- the adaptoroutboundContext- the outbound contextservice- 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 outboundContext, 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 objectadaptor- the adaptoroutboundContext- the outbound contextbinding- the bindingauthnRequest- 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 descriptorservice- the service- Returns:
- the signature signing parameters
-
getSignatureSigningConfiguration
protected org.opensaml.xmlsec.SignatureSigningConfiguration getSignatureSigningConfiguration(org.apereo.cas.support.saml.services.SamlRegisteredService service) throws Exception Gets signature signing configuration. The resolved used isSamlIdPMetadataCredentialResolverthat allows the entire criteria set to be passed to the role descriptor resolver. This behavior allows the passing ofSamlIdPSamlRegisteredServiceCriterionso signing configuration, etc can be fetched for a specific service as an override, if on is in fact defined for the service.- Parameters:
service- the service- Returns:
- the signature signing configuration
- Throws:
Exception- the exception
-
getSigningPrivateKey
protected PrivateKey getSigningPrivateKey(org.apereo.cas.support.saml.services.SamlRegisteredService registeredService) throws Exception Gets signing private key.- Parameters:
registeredService- the registered service- Returns:
- the signing private key
- Throws:
Exception- the exception
-
configureSignatureSigningSecurityConfiguration
protected org.opensaml.xmlsec.impl.BasicSignatureSigningConfiguration configureSignatureSigningSecurityConfiguration(org.apereo.cas.support.saml.services.SamlRegisteredService service) -
getResolvedSigningCredential
protected org.opensaml.security.credential.AbstractCredential getResolvedSigningCredential(org.opensaml.security.credential.Credential credential, PrivateKey privateKey, org.apereo.cas.support.saml.services.SamlRegisteredService service)
-