Class OpenSaml4MetadataResolver
java.lang.Object
org.springframework.security.saml2.provider.service.metadata.OpenSaml4MetadataResolver
- All Implemented Interfaces:
Saml2MetadataResolver
Resolves the SAML 2.0 Relying Party Metadata for a given
RelyingPartyRegistration using the OpenSAML API.- Since:
- 5.4
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA tuple containing an OpenSAMLEntityDescriptorand its associatedRelyingPartyRegistration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve(Iterable<RelyingPartyRegistration> relyingPartyRegistrations) resolve(RelyingPartyRegistration relyingPartyRegistration) Resolve the given relying party's metadatavoidsetEntityDescriptorCustomizer(Consumer<OpenSaml4MetadataResolver.EntityDescriptorParameters> entityDescriptorCustomizer) Set aConsumerfor modifying the OpenSAMLEntityDescriptorvoidsetSignMetadata(boolean signMetadata) Configure whether to sign the metadata, defaults tofalse.voidsetUsePrettyPrint(boolean usePrettyPrint) Configure whether to pretty-print the metadata XML.
-
Constructor Details
-
OpenSaml4MetadataResolver
public OpenSaml4MetadataResolver()
-
-
Method Details
-
resolve
Description copied from interface:Saml2MetadataResolverResolve the given relying party's metadata- Specified by:
resolvein interfaceSaml2MetadataResolver- Parameters:
relyingPartyRegistration- the relying party- Returns:
- the relying party's metadata
-
resolve
- Specified by:
resolvein interfaceSaml2MetadataResolver
-
setEntityDescriptorCustomizer
public void setEntityDescriptorCustomizer(Consumer<OpenSaml4MetadataResolver.EntityDescriptorParameters> entityDescriptorCustomizer) Set aConsumerfor modifying the OpenSAMLEntityDescriptor- Parameters:
entityDescriptorCustomizer- a consumer that accepts anOpenSaml4MetadataResolver.EntityDescriptorParameters- Since:
- 5.7
-
setUsePrettyPrint
public void setUsePrettyPrint(boolean usePrettyPrint) Configure whether to pretty-print the metadata XML. This can be helpful when signing the metadata payload.- Since:
- 6.2
-
setSignMetadata
public void setSignMetadata(boolean signMetadata) Configure whether to sign the metadata, defaults tofalse.- Since:
- 6.4
-