public class DefaultAuthorizationManager extends Object implements AuthorizationManager
Modifier and Type | Field and Description |
---|---|
static DefaultAuthorizationManager |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
canAccessResource(List<SingleConstraintMatch> constraints,
Account account,
ServletInfo servletInfo,
HttpServletRequest request,
Deployment deployment)
Tests if a user can access a given resource
|
boolean |
isUserInRole(String role,
Account account,
ServletInfo servletInfo,
HttpServletRequest request,
Deployment deployment)
Tests if a user is in a given role
|
TransportGuaranteeType |
transportGuarantee(TransportGuaranteeType currentConnectionGuarantee,
TransportGuaranteeType configuredRequiredGuarentee,
HttpServletRequest request)
Determines the transport guarantee type
|
public static final DefaultAuthorizationManager INSTANCE
public boolean isUserInRole(String role, Account account, ServletInfo servletInfo, HttpServletRequest request, Deployment deployment)
AuthorizationManager
isUserInRole
in interface AuthorizationManager
role
- The role nameaccount
- The user accountservletInfo
- The servlet info for the target servletrequest
- The servlet requestdeployment
- The deploymentpublic boolean canAccessResource(List<SingleConstraintMatch> constraints, Account account, ServletInfo servletInfo, HttpServletRequest request, Deployment deployment)
AuthorizationManager
canAccessResource
in interface AuthorizationManager
constraints
- The constraintsaccount
- The users accountservletInfo
- The servlet info for the target servletrequest
- The servlet requestdeployment
- The deploymentpublic TransportGuaranteeType transportGuarantee(TransportGuaranteeType currentConnectionGuarantee, TransportGuaranteeType configuredRequiredGuarentee, HttpServletRequest request)
AuthorizationManager
transportGuarantee
in interface AuthorizationManager
currentConnectionGuarantee
- The current connections transport guarantee typeconfiguredRequiredGuarentee
- The transport guarantee type specified in the deployment descriptor/annotationsrequest
- The requestCopyright © 2021 JBoss by Red Hat. All rights reserved.