Top Description Methods
io.undertow.servlet.api

public Interface AuthorizationManager

Known Direct Implementers
io.undertow.servlet.core.DefaultAuthorizationManager
Imports
io.undertow.security.idm.Account, jakarta.servlet.http.HttpServletRequest, java.util.List

Authorization manager. The servlet implementation delegates all authorization checks to this interface.
Author
Stuart Douglas

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the user can access the resource
canAccessResource
(List<SingleConstraintMatch>
The constraints
mappedConstraints
,
final Account
The users account
account
,
final ServletInfo
The servlet info for the target servlet
servletInfo
,
final HttpServletRequest
The servlet request
request
,
Deployment
The deployment
deployment
)

Tests if a user can access a given resource

public boolean

Returns:

true if the user is in the role
isUserInRole
(String
The role name
roleName
,
final Account
The user account
account
,
final ServletInfo
The servlet info for the target servlet
servletInfo
,
final HttpServletRequest
The servlet request
request
,
Deployment
The deployment
deployment
)

Tests if a user is in a given role

public TransportGuaranteeType

Returns:

The transport guarantee type
transportGuarantee
(TransportGuaranteeType
The current connections transport guarantee type
currentConnectionGuarantee
,
TransportGuaranteeType
The transport guarantee type specified in the deployment descriptor/annotations
configuredRequiredGuarantee
,
final HttpServletRequest
The request
request
)

Determines the transport guarantee type

Method Detail

canAccessResourceback to summary
public boolean canAccessResource(List<SingleConstraintMatch> mappedConstraints, final Account account, final ServletInfo servletInfo, final HttpServletRequest request, Deployment deployment)

Tests if a user can access a given resource

Parameters
mappedConstraints:List<SingleConstraintMatch>

The constraints

account:Account

The users account

servletInfo:ServletInfo

The servlet info for the target servlet

request:HttpServletRequest

The servlet request

deployment:Deployment

The deployment

Returns:boolean

true if the user can access the resource

isUserInRoleback to summary
public boolean isUserInRole(String roleName, final Account account, final ServletInfo servletInfo, final HttpServletRequest request, Deployment deployment)

Tests if a user is in a given role

Parameters
roleName:String

The role name

account:Account

The user account

servletInfo:ServletInfo

The servlet info for the target servlet

request:HttpServletRequest

The servlet request

deployment:Deployment

The deployment

Returns:boolean

true if the user is in the role

transportGuaranteeback to summary
public TransportGuaranteeType transportGuarantee(TransportGuaranteeType currentConnectionGuarantee, TransportGuaranteeType configuredRequiredGuarantee, final HttpServletRequest request)

Determines the transport guarantee type

Parameters
currentConnectionGuarantee:TransportGuaranteeType

The current connections transport guarantee type

configuredRequiredGuarantee:TransportGuaranteeType

The transport guarantee type specified in the deployment descriptor/annotations

request:HttpServletRequest

The request

Returns:TransportGuaranteeType

The transport guarantee type