Package io.undertow.servlet.api
Interface AuthorizationManager
-
- All Known Implementing Classes:
DefaultAuthorizationManager
public interface AuthorizationManagerAuthorization 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 booleancanAccessResource(List<SingleConstraintMatch> mappedConstraints, Account account, ServletInfo servletInfo, jakarta.servlet.http.HttpServletRequest request, Deployment deployment)Tests if a user can access a given resourcebooleanisUserInRole(String roleName, Account account, ServletInfo servletInfo, jakarta.servlet.http.HttpServletRequest request, Deployment deployment)Tests if a user is in a given roleTransportGuaranteeTypetransportGuarantee(TransportGuaranteeType currentConnectionGuarantee, TransportGuaranteeType configuredRequiredGuarantee, jakarta.servlet.http.HttpServletRequest request)Determines the transport guarantee type
-
-
-
Method Detail
-
isUserInRole
boolean isUserInRole(String roleName, 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(List<SingleConstraintMatch> mappedConstraints, 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
-
-