Package org.apache.felix.jaas
Interface LoginContextFactory
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
Modifier and TypeMethodDescriptioncreateLoginContext(String realm, Subject subject, CallbackHandler handler) Instantiate a newLoginContextobject with a name, aSubjectto be authenticated, and aCallbackHandlerobject.
-
Method Details
-
createLoginContext
LoginContext createLoginContext(String realm, Subject subject, CallbackHandler handler) throws LoginException Instantiate a newLoginContextobject with a name, aSubjectto be authenticated, and aCallbackHandlerobject.- Parameters:
realm- realm or application namesubject- theSubjectto authenticate.handler- theCallbackHandlerobject used by LoginModules to communicate with the user.- Returns:
- created LoginContext
- Throws:
LoginException- if the caller-specifiednamedoes not appear in theConfigurationand there is noConfigurationentry for "other", or if the caller-specifiedsubjectisnull, or if the caller-specifiedcallbackHandlerisnull.
-