atg.security
Class SecurityUtils

java.lang.Object
  extended by atg.security.SecurityUtils

public class SecurityUtils
extends java.lang.Object

Utility methods useful for security system operations.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
SecurityUtils()
           
 
Method Summary
static UserAuthority baseUserAuthority(UserAuthority pAuthority)
          Determines the "real" user authority given one that might be a proxy.
static boolean checkAuthenticationByPassword(LoginUserAuthority pLoginUserAuthority, java.lang.String pLogin, java.lang.String pPassword, java.lang.Object pHashKey)
          Performs an authentication test on a login name and password, but does not cause the assumption of the identity that is being authenticated if successful.
static boolean checkAuthenticationByPassword(LoginUserAuthority pLoginUserAuthority, java.lang.String pLogin, java.lang.String pPassword, java.lang.Object pHashKey, java.lang.String pPasswordSalt)
          Performs an authentication test on a login name and password, but does not cause the assumption of the identity that is being authenticated if successful.
static boolean compareUserAuthorities(UserAuthority pAuthority1, UserAuthority pAuthority2)
          Compares user authorities, returning true if they are effectively equivalent.
static void ensureEquivalentUserAuthorities(UserAuthority pAuthority, AccessControlList pAcl)
          Ensures that all of the personae in an access control list have equivalent user authorities to the indicated user authority.
static void ensureEquivalentUserAuthorities(UserAuthority pAuthority, Persona pPersona)
          Ensures that a persona has an equivalent user authority to the indicated authority.
static java.lang.String personaToString(Persona pPersona)
          Converts a Persona object to a standardized string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

SecurityUtils

public SecurityUtils()
Method Detail

baseUserAuthority

public static UserAuthority baseUserAuthority(UserAuthority pAuthority)
Determines the "real" user authority given one that might be a proxy.


compareUserAuthorities

public static boolean compareUserAuthorities(UserAuthority pAuthority1,
                                             UserAuthority pAuthority2)
Compares user authorities, returning true if they are effectively equivalent. This takes care of shell management.


ensureEquivalentUserAuthorities

public static void ensureEquivalentUserAuthorities(UserAuthority pAuthority,
                                                   Persona pPersona)
                                            throws SecurityException
Ensures that a persona has an equivalent user authority to the indicated authority. In case of failure, an InvalidPersonaException will be thrown.

Throws:
SecurityException

ensureEquivalentUserAuthorities

public static void ensureEquivalentUserAuthorities(UserAuthority pAuthority,
                                                   AccessControlList pAcl)
                                            throws SecurityException
Ensures that all of the personae in an access control list have equivalent user authorities to the indicated user authority. In case of mismatch, an InvalidPersona exception will be thrown.

Throws:
SecurityException

personaToString

public static java.lang.String personaToString(Persona pPersona)
Converts a Persona object to a standardized string representation.


checkAuthenticationByPassword

public static boolean checkAuthenticationByPassword(LoginUserAuthority pLoginUserAuthority,
                                                    java.lang.String pLogin,
                                                    java.lang.String pPassword,
                                                    java.lang.Object pHashKey)
                                             throws SecurityException
Performs an authentication test on a login name and password, but does not cause the assumption of the identity that is being authenticated if successful.

Throws:
SecurityException
See Also:
BasicIdentityManager.checkAuthenticationByPassword

checkAuthenticationByPassword

public static boolean checkAuthenticationByPassword(LoginUserAuthority pLoginUserAuthority,
                                                    java.lang.String pLogin,
                                                    java.lang.String pPassword,
                                                    java.lang.Object pHashKey,
                                                    java.lang.String pPasswordSalt)
                                             throws SecurityException
Performs an authentication test on a login name and password, but does not cause the assumption of the identity that is being authenticated if successful.

Throws:
SecurityException
See Also:
BasicIdentityManager.checkAuthenticationByPassword