Package org.eclipse.jetty.jaas.spi
Class AbstractLoginModule
java.lang.Object
org.eclipse.jetty.jaas.spi.AbstractLoginModule
- All Implemented Interfaces:
LoginModule
- Direct Known Subclasses:
AbstractDatabaseLoginModule
,LdapLoginModule
,PropertyFileLoginModule
AbstractLoginModule
Abstract base class for all LoginModules. Subclasses should
just need to implement getUserInfo method.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
abort()
boolean
commit()
Callback[]
abstract AbstractLoginModule.JAASUser
void
initialize
(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) boolean
boolean
boolean
boolean
login()
boolean
logout()
void
setAuthenticated
(boolean authState) void
void
setCommitted
(boolean commitState) void
void
-
Constructor Details
-
AbstractLoginModule
public AbstractLoginModule()
-
-
Method Details
-
getUser
- Throws:
Exception
-
getSubject
-
setSubject
-
getCurrentUser
-
setCurrentUser
-
getCallbackHandler
-
setCallbackHandler
-
isAuthenticated
public boolean isAuthenticated() -
isCommitted
public boolean isCommitted() -
setAuthenticated
public void setAuthenticated(boolean authState) -
setCommitted
public void setCommitted(boolean commitState) -
abort
- Specified by:
abort
in interfaceLoginModule
- Throws:
LoginException
-
commit
- Specified by:
commit
in interfaceLoginModule
- Returns:
- true if committed, false if not (likely not authenticated)
- Throws:
LoginException
- if unable to commit- See Also:
-
configureCallbacks
-
isIgnored
public boolean isIgnored() -
login
- Specified by:
login
in interfaceLoginModule
- Returns:
- true if is authenticated, false otherwise
- Throws:
LoginException
- if unable to login- See Also:
-
logout
- Specified by:
logout
in interfaceLoginModule
- Returns:
- true always
- Throws:
LoginException
- if unable to logout- See Also:
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) - Specified by:
initialize
in interfaceLoginModule
- Parameters:
subject
- the subjectcallbackHandler
- the callback handlersharedState
- the shared state mapoptions
- the option map- See Also:
-