Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.security
Class Security

    java.lang.Object
      weblogic.security.Security

    public final class Security

extends 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.

Constructor Summary
`Security()`

Method Summary
`static Subject` | `getCurrentSubject()` Returns a javax.security.auth.Subject object.
`static Object` | `runAs(Subject user, PrivilegedAction action)` Executes a privileged action on behalf of the user identity.
`static Object` | `runAs(Subject user, PrivilegedExceptionAction action)` Executes a 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`

Constructor Detail

### Security

    public Security()

Method Detail

### runAs

    public static Object runAs(Subject user,
                               PrivilegedAction action)

  Executes a privileged action on behalf of the user identity.

  Parameters:
    `user` - Identity to perform action on behalf of
    `action` - Privileged action to perform
  Returns:
    the return value of action.run()
  Throws:
    `SecurityException` - thrown if the subject or actions are null

### runAs

    public static Object runAs(Subject user,
                               PrivilegedExceptionAction action)
                        throws PrivilegedActionException

  Executes a privileged exception action on behalf of the user identity.

  Parameters:
    `user` - Identity to perform action on behalf of
    `action` - Privileged exception action to perform
  Returns:
    the return value of action.run()
  Throws:
    `SecurityException` - thrown if the subject or actions are null
    `PrivilegedActionException` - For exceptions generated during execution of the privileged exception action

### getCurrentSubject

    public static Subject getCurrentSubject()

  Returns a javax.security.auth.Subject object.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD