Package io.undertow.servlet.api
Interface AuthorizationManager
-
- All Known Implementing Classes:
DefaultAuthorizationManager
public interface AuthorizationManager
Authorization manager. The servlet implementation delegates all authorization checks to this interface.- Author:
- Stuart Douglas
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canAccessResource(java.util.List<SingleConstraintMatch> mappedConstraints, io.undertow.security.idm.Account account, ServletInfo servletInfo, jakarta.servlet.http.HttpServletRequest request, Deployment deployment)
Tests if a user can access a given resourceboolean
isUserInRole(java.lang.String roleName, io.undertow.security.idm.Account account, ServletInfo servletInfo, jakarta.servlet.http.HttpServletRequest request, Deployment deployment)
Tests if a user is in a given roleTransportGuaranteeType
transportGuarantee(TransportGuaranteeType currentConnectionGuarantee, TransportGuaranteeType configuredRequiredGuarantee, jakarta.servlet.http.HttpServletRequest request)
Determines the transport guarantee type
-
-
-
Method Detail
-
isUserInRole
boolean isUserInRole(java.lang.String roleName, io.undertow.security.idm.Account account, ServletInfo servletInfo, jakarta.servlet.http.HttpServletRequest request, Deployment deployment)
Tests if a user is in a given role- Parameters:
roleName
- The role nameaccount
- The user accountservletInfo
- The servlet info for the target servletrequest
- The servlet requestdeployment
- The deployment- Returns:
- true if the user is in the role
-
canAccessResource
boolean canAccessResource(java.util.List<SingleConstraintMatch> mappedConstraints, io.undertow.security.idm.Account account, ServletInfo servletInfo, jakarta.servlet.http.HttpServletRequest request, Deployment deployment)
Tests if a user can access a given resource- Parameters:
mappedConstraints
- The constraintsaccount
- The users accountservletInfo
- The servlet info for the target servletrequest
- The servlet requestdeployment
- The deployment- Returns:
- true if the user can access the resource
-
transportGuarantee
TransportGuaranteeType transportGuarantee(TransportGuaranteeType currentConnectionGuarantee, TransportGuaranteeType configuredRequiredGuarantee, jakarta.servlet.http.HttpServletRequest request)
Determines the transport guarantee type- Parameters:
currentConnectionGuarantee
- The current connections transport guarantee typeconfiguredRequiredGuarantee
- The transport guarantee type specified in the deployment descriptor/annotationsrequest
- The request- Returns:
- The transport guarantee type
-
-