public class AuthorizationInterceptor extends Object implements org.jboss.invocation.Interceptor
| Constructor and Description |
|---|
AuthorizationInterceptor(EJBMethodSecurityAttribute ejbMethodSecurityMetaData,
String viewClassName,
Method viewMethod,
String contextID) |
| Modifier and Type | Method and Description |
|---|---|
protected org.jboss.metadata.ejb.spec.MethodInterfaceType |
getMethodInterfaceType(MethodIntf viewType)
Gets the
MethodInterfaceType that corresponds to the specified MethodIntf. |
protected Set<Principal> |
getMethodRolesAsPrincipals()
Returns the method roles as a set of
Principal instances. |
Object |
processInvocation(org.jboss.invocation.InterceptorContext context) |
protected String |
setContextID(String contextID)
Sets the JACC contextID using a privileged action and returns the previousID from the
PolicyContext. |
public AuthorizationInterceptor(EJBMethodSecurityAttribute ejbMethodSecurityMetaData, String viewClassName, Method viewMethod, String contextID)
public Object processInvocation(org.jboss.invocation.InterceptorContext context) throws Exception
processInvocation in interface org.jboss.invocation.InterceptorExceptionprotected Set<Principal> getMethodRolesAsPrincipals()
Returns the method roles as a set of Principal instances. All roles specified in the method-permissions or
via RolesAllowed for this method are wrapped by a SimplePrincipal. If the method has been added to
the exclude-list or annotated with DenyAll, a NOBODY_PRINCIPAL is returned. If the method has been added
to the unchecked list or annotated with PermitAll, an ANYBODY_PRINCIPAL is returned.
protected org.jboss.metadata.ejb.spec.MethodInterfaceType getMethodInterfaceType(MethodIntf viewType)
Gets the MethodInterfaceType that corresponds to the specified MethodIntf.
viewType - the MethodIntf type to be converted.null if the type cannot be converted.Copyright © 2021 JBoss by Red Hat. All rights reserved.