Java org.springframework.security.config.annotation.web.builders HttpSecurity fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.security.config.annotation.web.builders HttpSecurity fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.security.config.annotation.web.builders HttpSecurity.

The text is from its open source code.

Field

RequestMatcherrequestMatcher

Constructor

Method

HttpSecurityaddFilter(Filter filter)
HttpSecurityaddFilterAfter(Filter filter, Class afterFilter)
HttpSecurityaddFilterBefore(Filter filter, Class beforeFilter)
AnonymousConfigureranonymous()
Allows configuring how an anonymous user is represented.
HttpSecurityantMatcher(String antPattern)
Allows configuring the HttpSecurity to only be invoked when matching the provided ant pattern.
HttpSecurityauthenticationProvider(AuthenticationProvider authenticationProvider)
ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistryauthorizeRequests()
Allows restricting access based upon the HttpServletRequest using

Example Configurations

The most basic example is to configure all URLs to require the role "ROLE_USER".
CsrfConfigurercsrf()
Adds CSRF support.
ExceptionHandlingConfigurerexceptionHandling()
Allows configuring exception handling.
FormLoginConfigurerformLogin()
Specifies to support form based authentication.
CgetConfigurer(Class clazz)
Gets the SecurityConfigurer by its class name or null if not found.
CgetSharedObject(Class sharedType)
Gets a shared Object.
HeadersConfigurerheaders()
Adds the Security headers to the response.
HttpBasicConfigurerhttpBasic()
Configures HTTP Basic authentication.
LogoutConfigurerlogout()
Provides logout support.
OpenIDLoginConfigureropenidLogin()
Allows configuring OpenID based authentication.
HttpSecurityregexMatcher(String pattern)
Allows configuring the HttpSecurity to only be invoked when matching the provided regex pattern.
RememberMeConfigurerrememberMe()
Allows configuring of Remember Me authentication.
HttpSecurityrequestCache(Customizer> requestCacheCustomizer)
Allows configuring the Request Cache.
RequestMatcherConfigurerrequestMatchers()
Allows specifying which HttpServletRequest instances this HttpSecurity will be invoked on.
ChannelSecurityConfigurer.ChannelRequestMatcherRegistryrequiresChannel()
Configures channel security.
SessionManagementConfigurersessionManagement()
Allows configuring of Session Management.
HttpSecurityuserDetailsService(UserDetailsService userDetailsService)