Package org.apache.felix.jaas
Interface LoginContextFactory
-
public interface LoginContextFactory
A factory for creatingLoginContext
instances.Instead of directly creating
LoginContext
this factory can be used. It takes care of locating theConfiguration
instance and switching of Thread's context classloader.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LoginContext
createLoginContext(String realm, Subject subject, CallbackHandler handler)
Instantiate a newLoginContext
object with a name, aSubject
to be authenticated, and aCallbackHandler
object.
-
-
-
Method Detail
-
createLoginContext
LoginContext createLoginContext(String realm, Subject subject, CallbackHandler handler) throws LoginException
Instantiate a newLoginContext
object with a name, aSubject
to be authenticated, and aCallbackHandler
object.- Parameters:
realm
- realm or application namesubject
- theSubject
to authenticate.handler
- theCallbackHandler
object used by LoginModules to communicate with the user.- Returns:
- created LoginContext
- Throws:
LoginException
- if the caller-specifiedname
does not appear in theConfiguration
and there is noConfiguration
entry for "other", or if the caller-specifiedsubject
isnull
, or if the caller-specifiedcallbackHandler
isnull
.
-
-