public abstract class LoginService extends AbstractBean
| Constructor and Description |
|---|
LoginService() |
LoginService(String server) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLoginListener(LoginListener listener)
Adds a LoginListener to the list of listeners
|
abstract boolean |
authenticate(String name,
char[] password,
String server)
This method is intended to be implemented by clients wishing to
authenticate a user with a given password.
|
void |
cancelAuthentication()
Notifies the LoginService that an already running authentication request
should be cancelled.
|
String |
getServer() |
boolean |
getSynchronous()
Get the synchronous property
|
String[] |
getUserRoles()
Called immediately after a successful authentication.
|
void |
removeLoginListener(LoginListener listener)
Removes a LoginListener from the list of listeners
|
void |
setServer(String server) |
void |
setSynchronous(boolean synchronous)
Sets the synchronous property
|
void |
startAuthentication(String user,
char[] password,
String server)
This method starts the authentication process and is either synchronous
or asynchronous based on the synchronous property
|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListenerpublic LoginService()
public LoginService(String server)
public abstract boolean authenticate(String name, char[] password, String server) throws Exception
name - usernamepassword - passwordserver - server (optional)true on authentication successExceptionpublic String[] getUserRoles()
nullpublic void cancelAuthentication()
public void startAuthentication(String user, char[] password, String server) throws Exception
user - userpassword - passwordserver - serverExceptionpublic boolean getSynchronous()
public void setSynchronous(boolean synchronous)
synchronous - synchronous propertypublic void addLoginListener(LoginListener listener)
listener - listenerpublic void removeLoginListener(LoginListener listener)
listener - listenerpublic String getServer()
public void setServer(String server)
server - The server to set.Copyright © 2017. All Rights Reserved.