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 boolean
checkResourcePermission(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 resourceboolean
checkResourcePermission(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 resourceboolean
hasRole(String roleName, Principal principal, String servletName, Set<Principal> principalRoles, String contextID, Subject callerSubject)
Validate that the caller has the required role to access a resourceboolean
hasRole(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 resourceboolean
hasUserDataPermission(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 callerboolean
hasUserDataPermission(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:AbstractWebAuthorizationHelper
Validate that the caller has the permission to access a web resource- Specified by:
checkResourcePermission
in 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:AbstractWebAuthorizationHelper
Validate that the caller has the permission to access a web resource- Specified by:
checkResourcePermission
in 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:AbstractWebAuthorizationHelper
Validate that the caller has the required role to access a resource- Specified by:
hasRole
in 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:AbstractWebAuthorizationHelper
Validate that the caller has the required role to access a resource- Specified by:
hasRole
in 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:AbstractWebAuthorizationHelper
Validate whether the transport constraints are met by the caller- Specified by:
hasUserDataPermission
in 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:AbstractWebAuthorizationHelper
Validate whether the transport constraints are met by the caller- Specified by:
hasUserDataPermission
in classAbstractWebAuthorizationHelper
- Returns:
-
-