public abstract class AbstractProfileBase extends Object implements org.springframework.beans.factory.InitializingBean
Modifier and Type | Field and Description |
---|---|
protected org.opensaml.common.binding.artifact.SAMLArtifactMap |
artifactMap |
protected org.opensaml.xml.XMLObjectBuilderFactory |
builderFactory |
protected org.slf4j.Logger |
log
Class logger.
|
protected MetadataManager |
metadata |
protected SAMLProcessor |
processor |
protected org.opensaml.common.binding.decoding.URIComparator |
uriComparator |
Constructor and Description |
---|
AbstractProfileBase() |
AbstractProfileBase(SAMLProcessor processor,
MetadataManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
buildCommonAttributes(String localEntityId,
org.opensaml.saml2.core.RequestAbstractType request,
org.opensaml.saml2.metadata.Endpoint service)
Fills the request with version, issue instants and destination data.
|
protected String |
generateID()
Generates random ID to be used as Request/Response ID.
|
protected String |
getEndpointBinding(org.opensaml.saml2.metadata.Endpoint endpoint)
Method is expected to return binding used to transfer messages to this endpoint.
|
protected org.opensaml.saml2.core.Issuer |
getIssuer(String localEntityId) |
int |
getMaxAssertionTime()
Maximum time between assertion creation and current time when the assertion is usable in seconds.
|
abstract String |
getProfileIdentifier()
Implementation are expected to provide an unique identifier for the profile this class implements.
|
int |
getResponseSkew() |
protected org.opensaml.saml2.core.Status |
getStatus(String code,
String statusMessage) |
protected boolean |
isEndpointMatching(org.opensaml.saml2.metadata.Endpoint endpoint,
String binding)
Determines whether given endpoint can be used together with the specified binding.
|
protected void |
sendMessage(SAMLMessageContext context,
boolean sign)
Method calls the processor and sends the message contained in the context.
|
protected void |
sendMessage(SAMLMessageContext context,
boolean sign,
String binding)
Method calls the processor and sends the message contained in the context.
|
void |
setArtifactMap(org.opensaml.common.binding.artifact.SAMLArtifactMap artifactMap) |
void |
setMaxAssertionTime(int maxAssertionTime)
Customizes max assertion time between assertion creation and it's usability.
|
void |
setMetadata(MetadataManager metadata) |
void |
setProcessor(SAMLProcessor processor) |
void |
setResponseSkew(int responseSkew)
Sets maximum difference between local time and time of the assertion creation which still allows
message to be processed.
|
protected void |
verifyEndpoint(org.opensaml.saml2.metadata.Endpoint endpoint,
String destination)
Verifies that the destination URL intended in the message matches with the endpoint address.
|
protected void |
verifyIssuer(org.opensaml.saml2.core.Issuer issuer,
SAMLMessageContext context) |
protected void |
verifySignature(org.opensaml.xml.signature.Signature signature,
String IDPEntityID,
org.opensaml.xml.signature.SignatureTrustEngine trustEngine) |
protected final org.slf4j.Logger log
protected MetadataManager metadata
protected SAMLProcessor processor
protected org.opensaml.common.binding.artifact.SAMLArtifactMap artifactMap
protected org.opensaml.xml.XMLObjectBuilderFactory builderFactory
protected org.opensaml.common.binding.decoding.URIComparator uriComparator
public AbstractProfileBase()
public AbstractProfileBase(SAMLProcessor processor, MetadataManager manager)
public abstract String getProfileIdentifier()
public void setResponseSkew(int responseSkew)
responseSkew
- response skew time (in seconds)public int getResponseSkew()
public int getMaxAssertionTime()
public void setMaxAssertionTime(int maxAssertionTime)
maxAssertionTime
- time in secondsprotected void sendMessage(SAMLMessageContext context, boolean sign) throws org.opensaml.saml2.metadata.provider.MetadataProviderException, org.opensaml.common.SAMLException, org.opensaml.ws.message.encoder.MessageEncodingException
context
- contextsign
- whether the message should be signedorg.opensaml.saml2.metadata.provider.MetadataProviderException
- metadata errororg.opensaml.common.SAMLException
- SAML encoding errororg.opensaml.ws.message.encoder.MessageEncodingException
- message encoding errorprotected void sendMessage(SAMLMessageContext context, boolean sign, String binding) throws org.opensaml.saml2.metadata.provider.MetadataProviderException, org.opensaml.common.SAMLException, org.opensaml.ws.message.encoder.MessageEncodingException
context
- contextsign
- whether the message should be signedbinding
- binding to use to send the messageorg.opensaml.saml2.metadata.provider.MetadataProviderException
- metadata errororg.opensaml.common.SAMLException
- SAML encoding errororg.opensaml.ws.message.encoder.MessageEncodingException
- message encoding errorprotected void buildCommonAttributes(String localEntityId, org.opensaml.saml2.core.RequestAbstractType request, org.opensaml.saml2.metadata.Endpoint service)
localEntityId
- entityId of the local party acting as message issuerrequest
- request to be filledservice
- service to use as destination for the requestprotected org.opensaml.saml2.core.Issuer getIssuer(String localEntityId)
protected String generateID()
protected void verifyIssuer(org.opensaml.saml2.core.Issuer issuer, SAMLMessageContext context) throws org.opensaml.common.SAMLException
org.opensaml.common.SAMLException
protected void verifyEndpoint(org.opensaml.saml2.metadata.Endpoint endpoint, String destination) throws org.opensaml.common.SAMLException
endpoint
- endpoint the message was received atdestination
- URL of the endpoint the message was intended to be sent to by the peer or null when not includedorg.opensaml.common.SAMLException
- in case endpoint doesn't matchprotected void verifySignature(org.opensaml.xml.signature.Signature signature, String IDPEntityID, org.opensaml.xml.signature.SignatureTrustEngine trustEngine) throws org.opensaml.xml.security.SecurityException, org.opensaml.xml.validation.ValidationException
org.opensaml.xml.security.SecurityException
org.opensaml.xml.validation.ValidationException
protected String getEndpointBinding(org.opensaml.saml2.metadata.Endpoint endpoint)
endpoint
- endpointprotected boolean isEndpointMatching(org.opensaml.saml2.metadata.Endpoint endpoint, String binding)
By default value of the binding in the endpoint is compared for equality with the user provided binding.
Method is automatically called for verification of user supplied binding value in the WebSSOProfileOptions.
endpoint
- endpoint to checkbinding
- binding the endpoint must support for the method to return true@Autowired public void setMetadata(MetadataManager metadata)
@Autowired(required=false) public void setProcessor(SAMLProcessor processor)
public void setArtifactMap(org.opensaml.common.binding.artifact.SAMLArtifactMap artifactMap)