org.jboss.security.javaee
Class EJBAuthenticationHelper

java.lang.Object
  extended by org.jboss.security.javaee.AbstractJavaEEHelper
      extended by 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
EJBAuthenticationHelper(SecurityContext sc)
           
 
Method Summary
 boolean isTrusted()
          Whether the current caller can be trusted?
 boolean isValid(Subject subject, String methodName)
          Authenticate the caller
 void 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, authorizationAudit, getCallerPrincipal, getContextMap, getPolicyRegistration, getSecurityContext, setPolicyRegistration, setSecurityContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
p -
cred -
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



Copyright © 2009 JBoss Inc.. All Rights Reserved.