public abstract class LoginService extends AbstractBean
Modifier and Type | Field and Description |
---|---|
private EventListenerList |
listenerList |
private Logger |
LOG |
private SwingWorker<Boolean,Void> |
loginWorker |
private String |
server |
private boolean |
synchronous |
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.
|
(package private) void |
fireLoginCanceled(LoginEvent source) |
(package private) void |
fireLoginFailed(LoginEvent source) |
(package private) void |
fireLoginStarted(LoginEvent source) |
(package private) void |
fireLoginSucceeded(LoginEvent source) |
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, removeVetoableChangeListener
private EventListenerList listenerList
private SwingWorker<Boolean,Void> loginWorker
private boolean synchronous
public 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 successException
public String[] getUserRoles()
null
public void cancelAuthentication()
public void startAuthentication(String user, char[] password, String server) throws Exception
user
- userpassword
- passwordserver
- serverException
public boolean getSynchronous()
public void setSynchronous(boolean synchronous)
synchronous
- synchronous propertypublic void addLoginListener(LoginListener listener)
listener
- listenerpublic void removeLoginListener(LoginListener listener)
listener
- listenervoid fireLoginStarted(LoginEvent source)
void fireLoginSucceeded(LoginEvent source)
void fireLoginFailed(LoginEvent source)
void fireLoginCanceled(LoginEvent source)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses