public abstract class BaseSamlProfileSamlResponseBuilder<T extends org.opensaml.core.xml.XMLObject> extends org.apereo.cas.support.saml.util.AbstractSaml20ObjectBuilder implements SamlProfileObjectBuilder
BaseSamlProfileSamlResponseBuilder is responsible for
building the final SAML assertion for the relying party.| Modifier and Type | Field and Description |
|---|---|
protected org.apereo.cas.configuration.CasConfigurationProperties |
casProperties
CAS settings.
|
protected SamlIdPObjectSigner |
samlObjectSigner
The Saml object encoder.
|
protected org.apache.velocity.app.VelocityEngine |
velocityEngineFactory
The Velocity engine factory.
|
| Constructor and Description |
|---|
BaseSamlProfileSamlResponseBuilder(org.apereo.cas.support.saml.OpenSamlConfigBean openSamlConfigBean,
SamlIdPObjectSigner samlObjectSigner,
org.apache.velocity.app.VelocityEngine velocityEngineFactory,
SamlProfileObjectBuilder<org.opensaml.saml.saml2.core.Assertion> samlProfileSamlAssertionBuilder,
SamlObjectEncrypter samlObjectEncrypter) |
| Modifier and Type | Method and Description |
|---|---|
T |
build(org.opensaml.saml.saml2.core.RequestAbstractType authnRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object casAssertion,
org.apereo.cas.support.saml.services.SamlRegisteredService service,
org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
java.lang.String binding,
org.opensaml.messaging.context.MessageContext messageContext)
Build response.
|
protected org.opensaml.saml.saml2.core.Issuer |
buildEntityIssuer()
Build entity issuer issuer.
|
protected abstract T |
buildResponse(org.opensaml.saml.saml2.core.Assertion assertion,
java.lang.Object casAssertion,
org.opensaml.saml.saml2.core.RequestAbstractType authnRequest,
org.apereo.cas.support.saml.services.SamlRegisteredService service,
org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String binding,
org.opensaml.messaging.context.MessageContext messageContext)
Build response response.
|
protected org.opensaml.saml.saml2.core.Assertion |
buildSamlAssertion(org.opensaml.saml.saml2.core.RequestAbstractType authnRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object casAssertion,
org.apereo.cas.support.saml.services.SamlRegisteredService service,
org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
java.lang.String binding,
org.opensaml.messaging.context.MessageContext messageContext)
Build saml assertion assertion.
|
protected abstract T |
encode(org.apereo.cas.support.saml.services.SamlRegisteredService service,
T samlResponse,
javax.servlet.http.HttpServletResponse httpResponse,
javax.servlet.http.HttpServletRequest httpRequest,
org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
java.lang.String relayState,
java.lang.String binding,
org.opensaml.saml.saml2.core.RequestAbstractType authnRequest,
java.lang.Object assertion)
Encode the final result into the http response.
|
protected T |
encodeFinalResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apereo.cas.support.saml.services.SamlRegisteredService service,
org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
T finalResponse,
java.lang.String binding,
org.opensaml.saml.saml2.core.RequestAbstractType authnRequest,
java.lang.Object assertion)
Encode final response.
|
protected org.opensaml.saml.common.SAMLObject |
encryptAssertion(org.opensaml.saml.saml2.core.Assertion assertion,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apereo.cas.support.saml.services.SamlRegisteredService service,
org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor)
Encrypt assertion.
|
addAttributeValuesToSaml2Attribute, decodeSamlAuthnRequest, generateSecureRandomId, getNameID, newAssertion, newAssertion, newAttribute, newAttributeStatement, newAuthnStatement, newConditions, newEcpResponse, newIssuer, newResponse, newStatus, newSubject, newSubjectprotected SamlIdPObjectSigner samlObjectSigner
protected final org.apache.velocity.app.VelocityEngine velocityEngineFactory
@Autowired protected org.apereo.cas.configuration.CasConfigurationProperties casProperties
public BaseSamlProfileSamlResponseBuilder(org.apereo.cas.support.saml.OpenSamlConfigBean openSamlConfigBean,
SamlIdPObjectSigner samlObjectSigner,
org.apache.velocity.app.VelocityEngine velocityEngineFactory,
SamlProfileObjectBuilder<org.opensaml.saml.saml2.core.Assertion> samlProfileSamlAssertionBuilder,
SamlObjectEncrypter samlObjectEncrypter)
public T build(org.opensaml.saml.saml2.core.RequestAbstractType authnRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object casAssertion, org.apereo.cas.support.saml.services.SamlRegisteredService service, org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, java.lang.String binding, org.opensaml.messaging.context.MessageContext messageContext) throws org.apereo.cas.support.saml.SamlException
SamlProfileObjectBuilderbuild in interface SamlProfileObjectBuilderauthnRequest - the authn requestrequest - the requestresponse - the responsecasAssertion - the assertionservice - the serviceadaptor - the adaptorbinding - the bindingmessageContext - the message contextorg.apereo.cas.support.saml.SamlException - the exceptionprotected T encodeFinalResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apereo.cas.support.saml.services.SamlRegisteredService service, org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, T finalResponse, java.lang.String binding, org.opensaml.saml.saml2.core.RequestAbstractType authnRequest, java.lang.Object assertion)
request - the requestresponse - the responseservice - the serviceadaptor - the adaptorfinalResponse - the final responsebinding - the bindingauthnRequest - the authn requestassertion - the assertionprotected org.opensaml.saml.saml2.core.Assertion buildSamlAssertion(org.opensaml.saml.saml2.core.RequestAbstractType authnRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object casAssertion,
org.apereo.cas.support.saml.services.SamlRegisteredService service,
org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
java.lang.String binding,
org.opensaml.messaging.context.MessageContext messageContext)
authnRequest - the authn requestrequest - the requestresponse - the responsecasAssertion - the cas assertionservice - the serviceadaptor - the adaptorbinding - the bindingmessageContext - the message contextprotected abstract T buildResponse(org.opensaml.saml.saml2.core.Assertion assertion, java.lang.Object casAssertion, org.opensaml.saml.saml2.core.RequestAbstractType authnRequest, org.apereo.cas.support.saml.services.SamlRegisteredService service, org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String binding, org.opensaml.messaging.context.MessageContext messageContext) throws org.apereo.cas.support.saml.SamlException
assertion - the assertioncasAssertion - the cas assertionauthnRequest - the authn requestservice - the serviceadaptor - the adaptorrequest - the requestresponse - the responsebinding - the bindingmessageContext - the message contextorg.apereo.cas.support.saml.SamlException - the saml exceptionprotected org.opensaml.saml.saml2.core.Issuer buildEntityIssuer()
protected abstract T encode(org.apereo.cas.support.saml.services.SamlRegisteredService service, T samlResponse, javax.servlet.http.HttpServletResponse httpResponse, javax.servlet.http.HttpServletRequest httpRequest, org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor, java.lang.String relayState, java.lang.String binding, org.opensaml.saml.saml2.core.RequestAbstractType authnRequest, java.lang.Object assertion) throws org.apereo.cas.support.saml.SamlException
service - the servicesamlResponse - the saml responsehttpResponse - the http response; may be null to mute encoding.httpRequest - the http requestadaptor - the adaptorrelayState - the relay statebinding - the bindingauthnRequest - the authn requestassertion - the assertionorg.apereo.cas.support.saml.SamlException - the saml exceptionprotected org.opensaml.saml.common.SAMLObject encryptAssertion(org.opensaml.saml.saml2.core.Assertion assertion,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apereo.cas.support.saml.services.SamlRegisteredService service,
org.apereo.cas.support.saml.services.idp.metadata.SamlRegisteredServiceServiceProviderMetadataFacade adaptor)
throws org.apereo.cas.support.saml.SamlException
assertion - the assertionrequest - the requestresponse - the responseservice - the serviceadaptor - the adaptororg.apereo.cas.support.saml.SamlException - the saml exception