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 javax.security.auth.login.LoginContext
createLoginContext(java.lang.String realm, javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler)
Instantiate a newLoginContext
object with a name, aSubject
to be authenticated, and aCallbackHandler
object.
-
-
-
Method Detail
-
createLoginContext
javax.security.auth.login.LoginContext createLoginContext(java.lang.String realm, javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler) throws javax.security.auth.login.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:
javax.security.auth.login.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
.
-
-