Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Securing web routes and HTTP verbs

Pragya Keshap answered on February 15, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


Securing web routes and HTTP verbs

0

@Bean signals this method as a bean definition to be picked up and added to the application context.

SecurityFilterChain is the bean type needed to define a Spring Security policy.

To define such a policy, we ask for a Spring Security HttpSecurity bean. This gives us a handle on defining rules that will govern our application.

authorizeRequests defines exactly how we will, you know, authorize requests. In this case, any request is allowed if the user is authenticated and that is the only rule applied.

In addition to that, the formLogin and httpBasic directives are switched on, enabling both HTTP Form and HTTP Basic, two standard authentication mechanisms.

The HttpSecurity builder, with these settings, is then used to render SecurityFilterChain through which all servlet requests will be routed.

Popularity 1/10 Helpfulness 1/10 Language java
Source: Grepper
Link to this answer
Share Copy Link
Contributed on Feb 15 2023
Pragya Keshap
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.