weblogic.security
Class Security
java.lang.Object
|
+--weblogic.security.Security
- public final class Security
- extends java.lang.Object
This class implements the WLS client runAs methods. Client applications use
the runAs methods to associate their Subject identity with the
PrivilagedAction or PrivilegedExceptionAction they plan to execute
- Author:
- Copyright © 2002 BEA Systems, Inc. All Rights Reserved.
Method Summary
|
static javax.security.auth.Subject |
getCurrentSubject()
Returns a javax.security.auth.Subject object. |
static java.lang.Object |
runAs(javax.security.auth.Subject user,
java.security.PrivilegedAction action)
Execution privileged action on behalf of the user identity. |
static java.lang.Object |
runAs(javax.security.auth.Subject user,
java.security.PrivilegedExceptionAction action)
Execution privileged exception action on behalf of the user identity. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Security
public Security()
runAs
public static java.lang.Object runAs(javax.security.auth.Subject user,
java.security.PrivilegedAction action)
throws java.lang.IllegalArgumentException
- Execution privileged action on behalf of the user identity.
- Parameters:
user
- Identity to perform action on behalf ofaction
- Privileged action to perform- Returns:
- the return value of action.run()
- Throws:
- java.lang.SecurityException - thrown if the subject or actions is null
runAs
public static java.lang.Object runAs(javax.security.auth.Subject user,
java.security.PrivilegedExceptionAction action)
throws java.security.PrivilegedActionException,
java.lang.IllegalArgumentException
- Execution privileged exception action on behalf of the user identity.
- Parameters:
user
- Identity to perform action on behalf ofaction
- Privileged exception action to perform- Returns:
- the return value of action.run()
- Throws:
- java.lang.SecurityException - thrown if the subject or actions is null
- java.security.PrivilegedActionException - For exceptions generated during
execution of the privileged exception action
getCurrentSubject
public static javax.security.auth.Subject getCurrentSubject()
- Returns a javax.security.auth.Subject object.