org.apache.felix.jaas

## Interface LoginContextFactory

    @ProviderType
    public interface LoginContextFactory

A factory for creating `LoginContext` instances.

Instead of directly creating `LoginContext` this factory can be used. It takes care of locating the `Configuration` instance and switching of Thread's context classloader.

### Method Summary

All Methods Instance Methods Abstract Methods
`LoginContext` `createLoginContext(String realm, Subject subject, CallbackHandler handler)` Instantiate a new `LoginContext` object with a name, a `Subject` to be authenticated, and a `CallbackHandler` object.

### Method Detail

#### createLoginContext

    LoginContext createLoginContext(String realm,
                                    Subject subject,
                                    CallbackHandler handler)
                             throws LoginException

Instantiate a new `LoginContext` object with a name, a `Subject` to be authenticated, and a `CallbackHandler` object.

Parameters:
  `realm` - realm or application name
  `subject` - the `Subject` to authenticate.
  `handler` - the `CallbackHandler` object used by LoginModules to communicate with the user.
Returns:
  created LoginContext
Throws:
  `LoginException` - if the caller-specified `name` does not appear in the `Configuration` and there is no `Configuration` entry for "other", or if the caller-specified `subject` is `null`, or if the caller-specified `callbackHandler` is `null`.