spring-framework / org.springframework.web.servlet.handler / UserRoleAuthorizationInterceptor

UserRoleAuthorizationInterceptor

open class UserRoleAuthorizationInterceptor : HandlerInterceptorAdapter

Interceptor that checks the authorization of the current user via the user's roles, as evaluated by HttpServletRequest's isUserInRole method.

Author
Juergen Hoeller

Since
20.06.2003

See Also
javax.servlet.http.HttpServletRequest#isUserInRole

Constructors

<init>

UserRoleAuthorizationInterceptor()

Interceptor that checks the authorization of the current user via the user's roles, as evaluated by HttpServletRequest's isUserInRole method.

Functions

preHandle

fun preHandle(request: HttpServletRequest, response: HttpServletResponse, handler: Any): Boolean

setAuthorizedRoles

fun setAuthorizedRoles(vararg authorizedRoles: String): Unit

Set the roles that this interceptor should treat as authorized.