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:
Component, DestructableComponent, InitializableComponent, AuthnRequestGenerator
An
AuthnRequestGenerator for the Swedish eID Framework.- Author:
- Martin Lindström (martin@idsec.se)
-
Constructor Summary
ConstructorsConstructorDescriptionSwedishEidAuthnRequestGenerator(String spEntityID, X509Credential signCredential, MetadataResolver metadataResolver) Constructor.SwedishEidAuthnRequestGenerator(EntityDescriptor spMetadata, X509Credential signCredential, MetadataResolver metadataResolver) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddExtensions(AuthnRequestBuilder builder, AuthnRequestGeneratorContext context, EntityDescriptor idpMetadata) If thecontextis aSwedishEidAuthnRequestGeneratorContext, the method will ask the context for builders for theSignMessageandPrincipalSelectionextensions, and add them if present.getAssuranceCertificationUris(EntityDescriptor idpMetadata, AuthnRequestGeneratorContext context) protected booleanPredicate that tells if the entity that we are serving is a signature service SP.voidsetSignMessageEncrypter(SignMessageEncrypter signMessageEncrypter) Adds the sign message encrypter.protected booleansupportsUserMessage(EntityDescriptor idpMetadata) Predicate that tells whether an IdP supports theUserMessageextension.Methods inherited from class DefaultAuthnRequestGenerator
getIdpMetadata, getMetadataResolver, getSpMetadataMethods inherited from class AbstractAuthnRequestGenerator
addScoping, buildRequestHttpObject, doInitialize, generateAuthnRequest, generateAuthnRequest, getBinding, getPossibleAssertionConsumerServices, getSignCredential, getSingleSignOnService, getSpEntityIDMethods inherited from class AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Constructor Details
-
SwedishEidAuthnRequestGenerator
public SwedishEidAuthnRequestGenerator(@Nonnull String spEntityID, @Nullable X509Credential signCredential, @Nonnull MetadataResolver metadataResolver) Constructor.- Parameters:
spEntityID- the SP entityIDsignCredential- the signing credentialmetadataResolver- the metadata resolver
-
SwedishEidAuthnRequestGenerator
public SwedishEidAuthnRequestGenerator(@Nonnull EntityDescriptor spMetadata, @Nullable X509Credential signCredential, @Nonnull MetadataResolver metadataResolver) Constructor.- Parameters:
spMetadata- the SP metadatasignCredential- the signing credentialmetadataResolver- the metadata resolver
-
-
Method Details
-
addExtensions
protected void addExtensions(@Nonnull AuthnRequestBuilder builder, @Nonnull AuthnRequestGeneratorContext context, @Nonnull EntityDescriptor idpMetadata) throws RequestGenerationException If thecontextis aSwedishEidAuthnRequestGeneratorContext, the method will ask the context for builders for theSignMessageandPrincipalSelectionextensions, and add them if present.- Overrides:
addExtensionsin classAbstractAuthnRequestGenerator- Throws:
RequestGenerationException
-
getAssuranceCertificationUris
@Nonnull protected List<String> getAssuranceCertificationUris(@Nonnull EntityDescriptor idpMetadata, @Nonnull AuthnRequestGeneratorContext context) throws RequestGenerationException - Overrides:
getAssuranceCertificationUrisin 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
Predicate that tells whether an IdP supports theUserMessageextension.- Parameters:
idpMetadata- the IdP metadata entry- Returns:
trueif the IdP supports the extension, andfalseotherwise
-
setSignMessageEncrypter
Adds the sign message encrypter.- Parameters:
signMessageEncrypter- the encrypter to add
-