Class SwedishEidAuthnRequestGenerator
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
se.swedenconnect.opensaml.saml2.request.AbstractAuthnRequestGenerator
se.swedenconnect.opensaml.saml2.request.DefaultAuthnRequestGenerator
se.swedenconnect.opensaml.sweid.saml2.request.SwedishEidAuthnRequestGenerator
- All Implemented Interfaces:
net.shibboleth.shared.component.Component
,net.shibboleth.shared.component.DestructableComponent
,net.shibboleth.shared.component.InitializableComponent
,AuthnRequestGenerator
An
AuthnRequestGenerator
for the Swedish eID Framework.- Author:
- Martin Lindström (martin@idsec.se)
-
Constructor Summary
ConstructorDescriptionSwedishEidAuthnRequestGenerator
(String spEntityID, org.opensaml.security.x509.X509Credential signCredential, org.opensaml.saml.metadata.resolver.MetadataResolver metadataResolver) Constructor.SwedishEidAuthnRequestGenerator
(org.opensaml.saml.saml2.metadata.EntityDescriptor spMetadata, org.opensaml.security.x509.X509Credential signCredential, org.opensaml.saml.metadata.resolver.MetadataResolver metadataResolver) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addExtensions
(AuthnRequestBuilder builder, AuthnRequestGeneratorContext context, org.opensaml.saml.saml2.metadata.EntityDescriptor idpMetadata) If thecontext
is aSwedishEidAuthnRequestGeneratorContext
, the method will ask the context for builders for theSignMessage
andPrincipalSelection
extensions, and add them if present.getAssuranceCertificationUris
(org.opensaml.saml.saml2.metadata.EntityDescriptor idpMetadata, AuthnRequestGeneratorContext context) protected boolean
Predicate that tells if the entity that we are serving is a signature service SP.void
setSignMessageEncrypter
(SignMessageEncrypter signMessageEncrypter) Adds the sign message encrypter.protected boolean
supportsUserMessage
(org.opensaml.saml.saml2.metadata.EntityDescriptor idpMetadata) Predicate that tells whether an IdP supports theUserMessage
extension.Methods inherited from class se.swedenconnect.opensaml.saml2.request.DefaultAuthnRequestGenerator
getIdpMetadata, getMetadataResolver, getSpMetadata
Methods inherited from class se.swedenconnect.opensaml.saml2.request.AbstractAuthnRequestGenerator
addScoping, buildRequestHttpObject, doInitialize, generateAuthnRequest, generateAuthnRequest, getBinding, getPossibleAssertionConsumerServices, getSignCredential, getSingleSignOnService, getSpEntityID
Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Constructor Details
-
SwedishEidAuthnRequestGenerator
public SwedishEidAuthnRequestGenerator(String spEntityID, org.opensaml.security.x509.X509Credential signCredential, org.opensaml.saml.metadata.resolver.MetadataResolver metadataResolver) Constructor.- Parameters:
spEntityID
- the SP entityIDsignCredential
- the signing credentialmetadataResolver
- the metadata resolver
-
SwedishEidAuthnRequestGenerator
public SwedishEidAuthnRequestGenerator(org.opensaml.saml.saml2.metadata.EntityDescriptor spMetadata, org.opensaml.security.x509.X509Credential signCredential, org.opensaml.saml.metadata.resolver.MetadataResolver metadataResolver) Constructor.- Parameters:
spMetadata
- the SP metadatasignCredential
- the signing credentialmetadataResolver
- the metadata resolver
-
-
Method Details
-
addExtensions
protected void addExtensions(AuthnRequestBuilder builder, AuthnRequestGeneratorContext context, org.opensaml.saml.saml2.metadata.EntityDescriptor idpMetadata) throws RequestGenerationException If thecontext
is aSwedishEidAuthnRequestGeneratorContext
, the method will ask the context for builders for theSignMessage
andPrincipalSelection
extensions, and add them if present.- Overrides:
addExtensions
in classAbstractAuthnRequestGenerator
- Throws:
RequestGenerationException
-
getAssuranceCertificationUris
protected List<String> getAssuranceCertificationUris(org.opensaml.saml.saml2.metadata.EntityDescriptor idpMetadata, AuthnRequestGeneratorContext context) throws RequestGenerationException - Overrides:
getAssuranceCertificationUris
in classAbstractAuthnRequestGenerator
- Throws:
RequestGenerationException
-
isSignatureService
protected boolean isSignatureService()Predicate that tells if the entity that we are serving is a signature service SP.- Returns:
- true if this is a signature service, and false otherwise
-
supportsUserMessage
protected boolean supportsUserMessage(org.opensaml.saml.saml2.metadata.EntityDescriptor idpMetadata) Predicate that tells whether an IdP supports theUserMessage
extension.- Parameters:
idpMetadata
- the IdP metadata entry- Returns:
true
if the IdP supports the extension, andfalse
otherwise
-
setSignMessageEncrypter
Adds the sign message encrypter.- Parameters:
signMessageEncrypter
- the encrypter to add
-