Package org.jboss.security.javaee
Class EJBAuthenticationHelper
- java.lang.Object
-
- org.jboss.security.javaee.AbstractJavaEEHelper
-
- org.jboss.security.javaee.EJBAuthenticationHelper
-
public class EJBAuthenticationHelper extends AbstractJavaEEHelper
Helper Class for EJB Authentication- Since:
- Apr 18, 2008
- Version:
- $Revision$
- Author:
- Anil.Saldhana@redhat.com
-
-
Field Summary
-
Fields inherited from class org.jboss.security.javaee.AbstractJavaEEHelper
policyRegistration, securityContext
-
-
Constructor Summary
Constructors Constructor Description EJBAuthenticationHelper(SecurityContext sc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isTrusted()
Whether the current caller can be trusted?boolean
isValid(Subject subject, String methodName)
Authenticate the callervoid
pushSubjectContext(Subject subject)
Push the authenticated subject onto the security context IMPORTANT - this needs to be done after the isValid call-
Methods inherited from class org.jboss.security.javaee.AbstractJavaEEHelper
audit, authenticationAudit, authorizationAudit, getCallerPrincipal, getContextMap, getPolicyRegistration, getSecurityContext, setPolicyRegistration, setSecurityContext
-
-
-
-
Constructor Detail
-
EJBAuthenticationHelper
public EJBAuthenticationHelper(SecurityContext sc)
-
-
Method Detail
-
isTrusted
public boolean isTrusted() throws IdentityTrustException
Whether the current caller can be trusted?- Returns:
- true - trust the caller, false - otherwise
- Throws:
IdentityTrustException
-
isValid
public boolean isValid(Subject subject, String methodName)
Authenticate the caller- Parameters:
subject
-methodName
-- Returns:
- Throws:
IllegalArgumentException
- subject or methodName is null
-
pushSubjectContext
public void pushSubjectContext(Subject subject)
Push the authenticated subject onto the security context IMPORTANT - this needs to be done after the isValid call
-
-