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
Modifier and TypeMethodDescriptionboolean
canAccessResource
(List<SingleConstraintMatch> mappedConstraints, io.undertow.security.idm.Account account, ServletInfo servletInfo, javax.servlet.http.HttpServletRequest request, Deployment deployment) Tests if a user can access a given resourceboolean
isUserInRole
(String roleName, io.undertow.security.idm.Account account, ServletInfo servletInfo, javax.servlet.http.HttpServletRequest request, Deployment deployment) Tests if a user is in a given roletransportGuarantee
(TransportGuaranteeType currentConnectionGuarantee, TransportGuaranteeType configuredRequiredGuarantee, javax.servlet.http.HttpServletRequest request) Determines the transport guarantee type
-
Method Details
-
isUserInRole
boolean isUserInRole(String roleName, io.undertow.security.idm.Account account, ServletInfo servletInfo, javax.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, io.undertow.security.idm.Account account, ServletInfo servletInfo, javax.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, javax.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
-