org.openejb.ri.sp
Class PseudoSecurityService

java.lang.Object
  extended by org.openejb.ri.sp.PseudoSecurityService
All Implemented Interfaces:
SecurityService, Service

public class PseudoSecurityService
extends java.lang.Object
implements SecurityService


Constructor Summary
PseudoSecurityService()
           
 
Method Summary
 java.lang.Object getSecurityIdentity()
           
 void init(java.util.Properties props)
           
 boolean isCallerAuthorized(java.lang.Object securityIdentity, java.lang.String[] roleNames)
          Check if securityIdentity is authorized to perform the specified action.
 void setSecurityIdentity(java.lang.Object securityIdentity)
           
 java.lang.Object translateTo(java.lang.Object securityIdentity, java.lang.Class type)
          Attempts to convert an opaque securityIdentity to a concrete target type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PseudoSecurityService

public PseudoSecurityService()
Method Detail

init

public void init(java.util.Properties props)
Specified by:
init in interface Service

getSecurityIdentity

public java.lang.Object getSecurityIdentity()
Specified by:
getSecurityIdentity in interface SecurityService

setSecurityIdentity

public void setSecurityIdentity(java.lang.Object securityIdentity)
Specified by:
setSecurityIdentity in interface SecurityService

isCallerAuthorized

public boolean isCallerAuthorized(java.lang.Object securityIdentity,
                                  java.lang.String[] roleNames)
Description copied from interface: SecurityService
Check if securityIdentity is authorized to perform the specified action. This is currently used by OpenEJB to check if a caller is authorized to to assume at least one of a collection of roles, the roles authorized for a particular method of a particular deployment.

Specified by:
isCallerAuthorized in interface SecurityService

translateTo

public java.lang.Object translateTo(java.lang.Object securityIdentity,
                                    java.lang.Class type)
Description copied from interface: SecurityService
Attempts to convert an opaque securityIdentity to a concrete target type. This is currently used to obtain an java.security.Princiapl type which must be returned by OpenEJB when a bean invokes EJBContext.getCallerPrincipal(). Conversion to a Principal type must be supported. It may also be used by JCX connectors to obtain the JAAS Subject of the caller, support for translation to Subject type is currently optional.

Specified by:
translateTo in interface SecurityService


Copyright © 1999-2011 OpenEJB. All Rights Reserved.