Class Saml2MetadataConfigurer<H extends HttpSecurityBuilder<H>>
- All Implemented Interfaces:
SecurityConfigurer<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.
Alternatively, a RelyingPartyRegistrationRepository @Bean may be
registered instead.
Security Filters
The followingFilter is populated:
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()Return theSecurityBuilderwhen done using theSecurityConfigurer.voidConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.metadataResponseResolver(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 org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer
disable, getSecurityContextHolderStrategy, withObjectPostProcessor, withObjectPostProcessorMethods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, 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:EntitiesDecriptorelement.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(Saml2MetadataResponseResolver metadataResponseResolver) Use thisSaml2MetadataResponseResolverto parse the request and respond with SAML 2.0 metadata.- Parameters:
metadataResponseResolver- to use- Returns:
- the
Saml2MetadataConfigurerfor more customizations
-
and
Description copied from class:SecurityConfigurerAdapterReturn theSecurityBuilderwhen done using theSecurityConfigurer. This is useful for method chaining.- Overrides:
andin classSecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Returns:
- the
SecurityBuilderfor further customizations
-
configure
Description copied from interface:SecurityConfigurerConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.- Specified by:
configurein interfaceSecurityConfigurer<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Overrides:
configurein classSecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Throws:
Exception
-