### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.user

# Class SubjectAuthenticator

java.lang.Object
com.sas.services.user.SubjectAuthenticator

@SASScope("ALL") @BinaryCompatibilityOnly public class SubjectAuthenticator extends Object
This class is used to marshal the contents of a Subject across a remote link to a UserService in order to create a UserContext based on the contents of the Subject.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static UserContextInterface`
  `newAuthenticatedUser(UserServiceInterface userService, Subject subject)`
  Create a UserContext from an already authenticated Subject.
  `static UserContextInterface`
  `newAuthenticatedUser(UserServiceInterface userService, Subject subject, Map advancedOptions)`
  Create a UserContext from an already authenticated Subject.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### newAuthenticatedUser

    public static UserContextInterface newAuthenticatedUser(UserServiceInterface userService, Subject subject) throws ServiceException, UserInitializationException, RemoteException
    Create a UserContext from an already authenticated Subject.
    Parameters:
      `userService` - The UserService to use to create the new UserContext. This will normally be a remote service.
      `subject` - The authenticated Subject to pass to the remote User Service to initialize a UserContext from.
    Returns:
      An initialized UserContext, or null if there's a failure.
    Throws:
      `UserInitializationException` - if a potentially recoverable error occurs during UserContext initialization.
      `ServiceException` - If an error occurs during user initialization.
      `RemoteException` - In the event of remote object failure.

  - ### newAuthenticatedUser

    public static UserContextInterface newAuthenticatedUser(UserServiceInterface userService, Subject subject, Map advancedOptions) throws ServiceException, UserInitializationException, RemoteException
    Create a UserContext from an already authenticated Subject.
    Parameters:
      `userService` - The UserService to use to create the new UserContext. This will normally be a remote service.
      `subject` - The authenticated Subject to pass to the remote User Service to initialize a UserContext from.
      `advancedOptions` - Map<String, Object> of advanced options.
    Returns:
      An initialized UserContext, or null if there's a failure.
    Throws:
      `UserInitializationException` - if a potentially recoverable error occurs during UserContext initialization.
      `ServiceException` - If an error occurs during user initialization.
      `RemoteException` - In the event of remote object failure.