public class WebSSOProfileImpl extends AbstractProfileBase implements WebSSOProfile
artifactMap, builderFactory, log, metadata, processor, uriComparator
Constructor and Description |
---|
WebSSOProfileImpl() |
WebSSOProfileImpl(SAMLProcessor processor,
MetadataManager manager) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildAuthnContext(org.opensaml.saml2.core.AuthnRequest request,
WebSSOProfileOptions options)
Fills the request with required AuthNContext according to selected options.
|
protected org.opensaml.saml2.core.IDPList |
buildIDPList(Set<String> idpEntityNames,
org.opensaml.saml2.metadata.SingleSignOnService serviceURI)
Builds an IdP List out of the idpEntityNames
|
protected void |
buildReturnAddress(org.opensaml.saml2.core.AuthnRequest request,
org.opensaml.saml2.metadata.AssertionConsumerService service)
Fills the request with assertion consumer service url and protocol binding based on assertionConsumer
to be used to deliver response from the IDP.
|
protected void |
buildScoping(org.opensaml.saml2.core.AuthnRequest request,
org.opensaml.saml2.metadata.SingleSignOnService serviceURI,
WebSSOProfileOptions options)
Fills the request with information about scoping, including IDP in the scope IDP List.
|
protected void |
builNameIDPolicy(org.opensaml.saml2.core.AuthnRequest request,
WebSSOProfileOptions options)
Fills the request with required AuthNContext according to selected options.
|
protected org.opensaml.saml2.metadata.AssertionConsumerService |
getAssertionConsumerService(WebSSOProfileOptions options,
org.opensaml.saml2.metadata.IDPSSODescriptor idpSSODescriptor,
org.opensaml.saml2.metadata.SPSSODescriptor spDescriptor)
Determines endpoint where should the identity provider return the SAML message.
|
protected org.opensaml.saml2.core.AuthnRequest |
getAuthnRequest(SAMLMessageContext context,
WebSSOProfileOptions options,
org.opensaml.saml2.metadata.AssertionConsumerService assertionConsumer,
org.opensaml.saml2.metadata.SingleSignOnService bindingService)
Returns AuthnRequest SAML message to be used to demand authentication from an IDP described using
idpEntityDescriptor, with an expected response to the assertionConsumer address.
|
String |
getProfileIdentifier()
Implementation are expected to provide an unique identifier for the profile this class implements.
|
protected org.opensaml.saml2.metadata.SingleSignOnService |
getSingleSignOnService(WebSSOProfileOptions options,
org.opensaml.saml2.metadata.IDPSSODescriptor idpssoDescriptor,
org.opensaml.saml2.metadata.SPSSODescriptor spDescriptor)
Method determines SingleSignOn service (and thus binding) to be used to deliver AuthnRequest to the IDP.
|
protected String |
getSPNameQualifier()
SAML-Core 2218, Specifies that returned subject identifier should be returned in the namespace of the given SP.
|
protected boolean |
isEndpointSupported(org.opensaml.saml2.metadata.AssertionConsumerService endpoint)
Determines whether given AssertionConsumerService can be used to deliver messages consumable by this profile.
|
protected boolean |
isEndpointSupported(org.opensaml.saml2.metadata.SingleSignOnService endpoint)
Determines whether given SingleSignOn service can be used together with this profile.
|
void |
sendAuthenticationRequest(SAMLMessageContext context,
WebSSOProfileOptions options)
Initializes SSO by creating AuthnRequest assertion and sending it to the IDP using the default binding.
|
afterPropertiesSet, buildCommonAttributes, generateID, getEndpointBinding, getIssuer, getMaxAssertionTime, getResponseSkew, getStatus, isEndpointMatching, sendMessage, sendMessage, setArtifactMap, setMaxAssertionTime, setMetadata, setProcessor, setResponseSkew, verifyEndpoint, verifyIssuer, verifySignature
public WebSSOProfileImpl()
public WebSSOProfileImpl(SAMLProcessor processor, MetadataManager manager)
public String getProfileIdentifier()
AbstractProfileBase
getProfileIdentifier
in class AbstractProfileBase
public void sendAuthenticationRequest(SAMLMessageContext context, WebSSOProfileOptions options) throws org.opensaml.common.SAMLException, org.opensaml.saml2.metadata.provider.MetadataProviderException, org.opensaml.ws.message.encoder.MessageEncodingException
sendAuthenticationRequest
in interface WebSSOProfile
options
- values specified by caller to customize format of sent requestorg.opensaml.common.SAMLException
- error initializing SSOorg.opensaml.common.SAMLRuntimeException
- in case context doesn't contain required entities or contains invalid dataorg.opensaml.saml2.metadata.provider.MetadataProviderException
- error retrieving needed metadataorg.opensaml.ws.message.encoder.MessageEncodingException
- error forming SAML messageprotected org.opensaml.saml2.metadata.SingleSignOnService getSingleSignOnService(WebSSOProfileOptions options, org.opensaml.saml2.metadata.IDPSSODescriptor idpssoDescriptor, org.opensaml.saml2.metadata.SPSSODescriptor spDescriptor) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
options
- user supplied preferences, binding attribute is usedidpssoDescriptor
- idpspDescriptor
- sporg.opensaml.saml2.metadata.provider.MetadataProviderException
- in case binding from the options is invalid or not found or when no default service can be foundprotected org.opensaml.saml2.metadata.AssertionConsumerService getAssertionConsumerService(WebSSOProfileOptions options, org.opensaml.saml2.metadata.IDPSSODescriptor idpSSODescriptor, org.opensaml.saml2.metadata.SPSSODescriptor spDescriptor) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
In case endpoint determined by the webSSOProfileOptions index is not supported by the profile an exception is raised.
options
- user supplied preferencesidpSSODescriptor
- idp, can be null when no IDP is known in advancespDescriptor
- sporg.opensaml.saml2.metadata.provider.MetadataProviderException
- in case index supplied in options is invalid or unsupported or no supported consumer service can be foundprotected boolean isEndpointSupported(org.opensaml.saml2.metadata.SingleSignOnService endpoint) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
endpoint
- endpointorg.opensaml.saml2.metadata.provider.MetadataProviderException
- in case system can't verify whether endpoint is supported or notprotected boolean isEndpointSupported(org.opensaml.saml2.metadata.AssertionConsumerService endpoint) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
endpoint
- endpointorg.opensaml.saml2.metadata.provider.MetadataProviderException
- in case system can't verify whether endpoint is supported or notprotected org.opensaml.saml2.core.AuthnRequest getAuthnRequest(SAMLMessageContext context, WebSSOProfileOptions options, org.opensaml.saml2.metadata.AssertionConsumerService assertionConsumer, org.opensaml.saml2.metadata.SingleSignOnService bindingService) throws org.opensaml.common.SAMLException, org.opensaml.saml2.metadata.provider.MetadataProviderException
context
- message contextoptions
- preferences of message creationassertionConsumer
- assertion consumer where the IDP should respondbindingService
- service used to deliver the requestorg.opensaml.common.SAMLException
- error creating the messageorg.opensaml.saml2.metadata.provider.MetadataProviderException
- error retreiving metadataprotected void builNameIDPolicy(org.opensaml.saml2.core.AuthnRequest request, WebSSOProfileOptions options)
request
- request to filloptions
- options driving generation of the elementprotected String getSPNameQualifier()
protected void buildAuthnContext(org.opensaml.saml2.core.AuthnRequest request, WebSSOProfileOptions options)
request
- request to filloptions
- options driving generation of the elementprotected void buildReturnAddress(org.opensaml.saml2.core.AuthnRequest request, org.opensaml.saml2.metadata.AssertionConsumerService service) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
request
- requestservice
- service to deliver response to, building is skipped when nullorg.opensaml.saml2.metadata.provider.MetadataProviderException
- error retrieving metadata informationprotected void buildScoping(org.opensaml.saml2.core.AuthnRequest request, org.opensaml.saml2.metadata.SingleSignOnService serviceURI, WebSSOProfileOptions options)
request
- request to fillserviceURI
- destination to send the request tooptions
- options driving generation of the element, contains list of allowed IDPsprotected org.opensaml.saml2.core.IDPList buildIDPList(Set<String> idpEntityNames, org.opensaml.saml2.metadata.SingleSignOnService serviceURI)
idpEntityNames
- The IdPs Entity IDs to include in the IdP List, no list is created when nullserviceURI
- The binding service for an IdP for a specific binding. Should be null
if there is more than one IdP in the list or if the destination IdP is not known in
advance.