A

Arogya • 3.49K Points
Extraordinary

Q. Which method restricts access based on authorities in configuration?

Code:
http.authorizeHttpRequests()
.requestMatchers("/admin/**") .hasAuthority("ADMIN");
  • (A) hasAuthority()
  • (B) permitAll()
  • (C) denyAll()
  • (D) authenticated()
  • Correct Answer - Option(A)
  • Views: 13
  • Filed under category Spring Security
  • Hashtags:

Explanation by: Arogya

hasAuthority() restricts access to users having specific permission.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.