1.

State the difference between ROLE_USER and ROLE_ANONYMOUS in a spring intercept-url configuration.

Answer»
  • ROLE_USER: It has no relevance unless you assign it to your users as soon as they are AUTHENTICATED. You are responsible for loading the ROLES (AUTHORITIES) for each authenticated user.
  • ROLE_ANONYMOUS: When a configuration uses Spring Security's "anonymous AUTHENTICATION" filter, ROLE_ANONYMOUS is the default role assigned to an anonymous (unauthenticated) user. ROLE_ANONYMOUS is ENABLED by default. However, it would be better if you used the expression isAnonymous() instead, which has the same meaning.


Discussion

No Comment Found