Class WebAuthorizationHelper
- java.lang.Object
-
- org.jboss.security.javaee.AbstractJavaEEHelper
-
- org.jboss.security.javaee.AbstractWebAuthorizationHelper
-
- org.jboss.security.plugins.javaee.WebAuthorizationHelper
-
public class WebAuthorizationHelper extends AbstractWebAuthorizationHelper
Web Authorization Helper Implementation- Since:
- Apr 18, 2008
- Version:
- $Revision$
- Author:
- Anil.Saldhana@redhat.com
-
-
Field Summary
-
Fields inherited from class org.jboss.security.javaee.AbstractWebAuthorizationHelper
enableAudit
-
Fields inherited from class org.jboss.security.javaee.AbstractJavaEEHelper
policyRegistration, securityContext
-
-
Constructor Summary
Constructors Constructor Description WebAuthorizationHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckResourcePermission(Map<String,Object> contextMap, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, Subject callerSubject, String contextID, String canonicalRequestURI)Validate that the caller has the permission to access a web resourcebooleancheckResourcePermission(Map<String,Object> contextMap, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, Subject callerSubject, String contextID, String canonicalRequestURI, List<String> roles)Validate that the caller has the permission to access a web resourcebooleanhasRole(String roleName, Principal principal, String servletName, Set<Principal> principalRoles, String contextID, Subject callerSubject)Validate that the caller has the required role to access a resourcebooleanhasRole(String roleName, Principal principal, String servletName, Set<Principal> principalRoles, String contextID, Subject callerSubject, List<String> roles)Validate that the caller has the required role to access a resourcebooleanhasUserDataPermission(Map<String,Object> contextMap, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, String contextID, Subject callerSubject)Validate whether the transport constraints are met by the callerbooleanhasUserDataPermission(Map<String,Object> contextMap, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, String contextID, Subject callerSubject, List<String> roles)Validate whether the transport constraints are met by the caller-
Methods inherited from class org.jboss.security.javaee.AbstractWebAuthorizationHelper
isEnableAudit, setEnableAudit
-
Methods inherited from class org.jboss.security.javaee.AbstractJavaEEHelper
audit, authenticationAudit, authorizationAudit, getCallerPrincipal, getContextMap, getPolicyRegistration, getSecurityContext, setPolicyRegistration, setSecurityContext
-
-
-
-
Method Detail
-
checkResourcePermission
public boolean checkResourcePermission(Map<String,Object> contextMap, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, Subject callerSubject, String contextID, String canonicalRequestURI)
Description copied from class:AbstractWebAuthorizationHelperValidate that the caller has the permission to access a web resource- Specified by:
checkResourcePermissionin classAbstractWebAuthorizationHelper- Returns:
- true - permitted
-
checkResourcePermission
public boolean checkResourcePermission(Map<String,Object> contextMap, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, Subject callerSubject, String contextID, String canonicalRequestURI, List<String> roles)
Description copied from class:AbstractWebAuthorizationHelperValidate that the caller has the permission to access a web resource- Specified by:
checkResourcePermissionin classAbstractWebAuthorizationHelper- Returns:
- true - permitted
-
hasRole
public boolean hasRole(String roleName, Principal principal, String servletName, Set<Principal> principalRoles, String contextID, Subject callerSubject)
Description copied from class:AbstractWebAuthorizationHelperValidate that the caller has the required role to access a resource- Specified by:
hasRolein classAbstractWebAuthorizationHelper- Returns:
-
hasRole
public boolean hasRole(String roleName, Principal principal, String servletName, Set<Principal> principalRoles, String contextID, Subject callerSubject, List<String> roles)
Description copied from class:AbstractWebAuthorizationHelperValidate that the caller has the required role to access a resource- Specified by:
hasRolein classAbstractWebAuthorizationHelper- Returns:
-
hasUserDataPermission
public boolean hasUserDataPermission(Map<String,Object> contextMap, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, String contextID, Subject callerSubject)
Description copied from class:AbstractWebAuthorizationHelperValidate whether the transport constraints are met by the caller- Specified by:
hasUserDataPermissionin classAbstractWebAuthorizationHelper- Returns:
-
hasUserDataPermission
public boolean hasUserDataPermission(Map<String,Object> contextMap, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, String contextID, Subject callerSubject, List<String> roles)
Description copied from class:AbstractWebAuthorizationHelperValidate whether the transport constraints are met by the caller- Specified by:
hasUserDataPermissionin classAbstractWebAuthorizationHelper- Returns:
-
-