Interface ILoginContext
public interface ILoginContext
The ILoginContext is the central entry point for the authentication support.
 Use it to perform login, logout, and retrieve information associated with the
 security subject.
 
This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
- 
Method SummaryModifier and TypeMethodDescriptionThe method exposes underlying JAAS LoginContext.Retrieves the current Subject.voidlogin()Call this method to perform a login.voidlogout()Call this method to perform a logout.voidregisterListener(ILoginContextListener listener) Adds listener to be notified on security-related events.voidunregisterListener(ILoginContextListener listener) Removes listener previously registered to receive notifications on security-related events.
- 
Method Details- 
loginCall this method to perform a login.- Throws:
- LoginException- if the authentication fails.
- See Also:
 
- 
logoutCall this method to perform a logout.- Throws:
- LoginException- if the logout fails.
- See Also:
 
- 
getSubjectRetrieves the current Subject. Calling this method will force a login to occur if the user is not already logged in.- Returns:
- the Subject
- Throws:
- LoginException
- See Also:
 
- 
registerListenerAdds listener to be notified on security-related events.- Parameters:
- listener- the listener to be registered
- See Also:
 
- 
unregisterListenerRemoves listener previously registered to receive notifications on security-related events.- Parameters:
- listener- the listener to be unregistered
- See Also:
 
- 
getLoginContextThe method exposes underlying JAAS LoginContext.Using the LoginContext directly will bypass some of the processing offered by this interface and should be used only when other methods are not sufficient. - Returns:
- the underlying JAAS LoginContext
- Throws:
- LoginException- if exception was encountered while creating LoginContext
 
 
-