Top Description Fields Constructors Methods
io.undertow.servlet.core

public Class DefaultAuthorizationManager

extends Object
implements AuthorizationManager
Class Inheritance
All Implemented Interfaces
io.undertow.servlet.api.AuthorizationManager
Imports
io.undertow.security.idm.Account, io.undertow.servlet.api.AuthorizationManager, .Deployment, .SecurityInfo, .SecurityRoleRef, .ServletInfo, .TransportGuaranteeType, .SingleConstraintMatch, jakarta.servlet.http.HttpServletRequest, java.util.List, .Map, .Set

Default authorization manager that simply implements the rules as specified by the servlet spec
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
public static final DefaultAuthorizationManager

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
canAccessResource(List<SingleConstraintMatch>
The constraints
constraints
,
Account
The users account
account
,
ServletInfo
The servlet info for the target servlet
servletInfo
,
HttpServletRequest
The servlet request
request
,
Deployment
The deployment
deployment
)

Implements io.undertow.servlet.api.AuthorizationManager.canAccessResource.

Tests if a user can access a given resource

public boolean
isUserInRole(String
The role name
role
,
Account
The user account
account
,
ServletInfo
The servlet info for the target servlet
servletInfo
,
HttpServletRequest
The servlet request
request
,
Deployment
The deployment
deployment
)

Implements io.undertow.servlet.api.AuthorizationManager.isUserInRole.

Tests if a user is in a given role

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

Implements io.undertow.servlet.api.AuthorizationManager.transportGuarantee.

Determines the transport guarantee type

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final DefaultAuthorizationManager INSTANCE

Constructor Detail

DefaultAuthorizationManagerback to summary
private DefaultAuthorizationManager()

Method Detail

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

Implements io.undertow.servlet.api.AuthorizationManager.canAccessResource.

Doc from io.undertow.servlet.api.AuthorizationManager.canAccessResource.

Tests if a user can access a given resource

Parameters
constraints: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

Annotations
@Override
isUserInRoleback to summary
public boolean isUserInRole(String role, Account account, ServletInfo servletInfo, HttpServletRequest request, Deployment deployment)

Implements io.undertow.servlet.api.AuthorizationManager.isUserInRole.

Doc from io.undertow.servlet.api.AuthorizationManager.isUserInRole.

Tests if a user is in a given role

Parameters
role: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

Annotations
@Override
transportGuaranteeback to summary
public TransportGuaranteeType transportGuarantee(TransportGuaranteeType currentConnectionGuarantee, TransportGuaranteeType configuredRequiredGuarentee, HttpServletRequest request)

Implements io.undertow.servlet.api.AuthorizationManager.transportGuarantee.

Doc from io.undertow.servlet.api.AuthorizationManager.transportGuarantee.

Determines the transport guarantee type

Parameters
currentConnectionGuarantee:TransportGuaranteeType

The current connections transport guarantee type

configuredRequiredGuarentee:TransportGuaranteeType

The transport guarantee type specified in the deployment descriptor/annotations

request:HttpServletRequest

The request

Returns:TransportGuaranteeType

The transport guarantee type

Annotations
@Override