Methods Summary |
---|
static char[] | getCredential()
char[] credential;
if(System.getSecurityManager() == null)
{
credential = PrincipalActions.NON_PRIVILEGED.getCredential();
}
else
{
credential = PrincipalActions.PRIVILEGED.getCredential();
}
return credential;
|
private static char[] | getPassword()
Object credential = SecurityAssociation.getCredential();
char[] password = null;
if( credential instanceof char[] )
{
password = (char[]) credential;
}
else if( credential instanceof byte[] )
{
try
{
String tmp = new String((byte[]) credential, "UTF-8");
password = tmp.toCharArray();
}
catch (UnsupportedEncodingException e)
{
throw new SecurityException(e.getMessage());
}
}
else if( credential != null )
{
String tmp = credential.toString();
password = tmp.toCharArray();
}
return password;
|
static java.security.Principal | getPrincipal()
Principal principal;
if(System.getSecurityManager() == null)
{
principal = PrincipalActions.NON_PRIVILEGED.getPrincipal();
}
else
{
principal = PrincipalActions.PRIVILEGED.getPrincipal();
}
return principal;
|
static org.jboss.security.RunAsIdentity | peekRunAsIdentity()
if(System.getSecurityManager() == null)
{
return PrincipalActions.NON_PRIVILEGED.peek();
}
else
{
return PrincipalActions.PRIVILEGED.peek();
}
|