Class Saml2MetadataConfigurer<H extends HttpSecurityBuilder<H>>
- All Implemented Interfaces:
SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain, H>
AbstractHttpConfigurer for SAML 2.0 Metadata.
SAML 2.0 Metadata provides an application with the capability to publish configuration
information as a <md:EntityDescriptor> or <md:EntitiesDescriptor>.
Defaults are provided for all configuration options with the only required
configuration being a
Saml2LoginConfigurer.relyingPartyRegistrationRepository(HttpSecurityBuilder).
Alternatively, a RelyingPartyRegistrationRepository @Bean may be
registered instead.
Security Filters
The followingFilter is populated:
Saml2MetadataFilter
Shared Objects Created
noneShared Objects Used
The following shared objects are used:RelyingPartyRegistrationRepository(required)
- Since:
- 6.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSaml2MetadataConfigurer(org.springframework.context.ApplicationContext context) -
Method Summary
Modifier and TypeMethodDescriptionand()voidConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.metadataResponseResolver(org.springframework.security.saml2.provider.service.metadata.Saml2MetadataResponseResolver metadataResponseResolver) Use thisSaml2MetadataResponseResolverto parse the request and respond with SAML 2.0 metadata.metadataUrl(String metadataUrl) Use this endpoint to request relying party metadata.Methods inherited from class AbstractHttpConfigurer
disable, getRequestMatcherBuilder, getSecurityContextHolderStrategy, withObjectPostProcessorMethods inherited from class SecurityConfigurerAdapter
addObjectPostProcessor, getBuilder, init, postProcess, setBuilder
-
Constructor Details
-
Saml2MetadataConfigurer
public Saml2MetadataConfigurer(org.springframework.context.ApplicationContext context)
-
-
Method Details
-
metadataUrl
Use this endpoint to request relying party metadata.If you specify a
registrationIdplaceholder in the URL, then the filter will lookup aRelyingPartyRegistrationusing that.If there is no
registrationIdand yourRelyingPartyRegistrationRepositoryis {code Iterable}, the metadata endpoint will try and show all relying parties' metadata in a single<md:EntitiesDescriptorelement.If you need a more sophisticated lookup strategy than these, use
metadataResponseResolverinstead.- Parameters:
metadataUrl- the url to use- Returns:
- the
Saml2MetadataConfigurerfor more customizations
-
metadataResponseResolver
public Saml2MetadataConfigurer<H> metadataResponseResolver(org.springframework.security.saml2.provider.service.metadata.Saml2MetadataResponseResolver metadataResponseResolver) Use thisSaml2MetadataResponseResolverto parse the request and respond with SAML 2.0 metadata.- Parameters:
metadataResponseResolver- to use- Returns:
- the
Saml2MetadataConfigurerfor more customizations
-
and
-
configure
Description copied from interface:SecurityConfigurerConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.- Specified by:
configurein interfaceSecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain, H extends HttpSecurityBuilder<H>>- Overrides:
configurein classSecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain, H extends HttpSecurityBuilder<H>>- Parameters:
http-
-