org.modeshape.jcr.api

## Class JaasCredentials

- java.lang.Object
- - org.modeshape.jcr.api.JaasCredentials

- All Implemented Interfaces:
    Serializable, Credentials

      public final class JaasCredentials
      extends Object
      implements Credentials

  A `Credentials` implementation that encapsulates an existing JAAS `LoginContext` instance. This can be used if ModeShape is configured to use a different JAAS realm.

  ModeShape will understand this Credentials implementation because it has a `getLoginContext()` method that returns a `LoginContext` object.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JaasCredentials(LoginContext loginContext)` Create a credentials that uses the supplied JAAS LoginContext for authentication and authorization.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `LoginContext` | `getLoginContext()` Get the JAAS login context

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

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

- - ### Constructor Detail

    - #### JaasCredentials

          public JaasCredentials(LoginContext loginContext)

      Create a credentials that uses the supplied JAAS LoginContext for authentication and authorization.
      Parameters:
        `loginContext` - the JAAS login context
      Throws:
        `IllegalArgumentException` - if the provided argument is null

  - ### Method Detail

    - #### getLoginContext

          public LoginContext getLoginContext()

      Get the JAAS login context
      Returns:
        loginContext the login context

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.