Package be.gaudry.swing.authentication
Class SSOLoginService
java.lang.Object
org.jdesktop.beans.AbstractBean
org.jdesktop.swingx.auth.LoginService
be.gaudry.swing.authentication.SSOLoginService
- Direct Known Subclasses:
EduAdminLoginService
,EduTeacherLoginService
public abstract class SSOLoginService
extends org.jdesktop.swingx.auth.LoginService
"Single Sign On" login mechanism.
Provided by the broldev.core.swing project.
- Since:
- 1.0 (Oct 17, 2010), broldev.core.swing 0.0.1-SNAPSHOT dependency
- Version:
- 1.0 (Oct 17, 2010)
- Author:
- Steph GAUDRY
-
Constructor Summary
ConstructorDescriptionBuilds a default instance of the Single Sign OnSSOLoginService(String server)
Builds a custom instance of the Single Sign On -
Method Summary
Modifier and TypeMethodDescriptionboolean
authenticate(String name, char[] password, String server)
abstract boolean
authenticateOnce(String name, char[] password, String server)
This method is intended to be implemented by clients wishing to authenticate a user with a given password.boolean
Status of the Single Sign On.void
logOff()
Sets this instance into an unauthenticated state, as at the beginning.Methods inherited from class org.jdesktop.swingx.auth.LoginService
addLoginListener, cancelAuthentication, getServer, getSynchronous, getUserRoles, removeLoginListener, setServer, setSynchronous, startAuthentication
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Constructor Details
-
SSOLoginService
public SSOLoginService()Builds a default instance of the Single Sign On -
SSOLoginService
Builds a custom instance of the Single Sign On- Parameters:
server
- of the login service
-
-
Method Details
-
logOff
public void logOff()Sets this instance into an unauthenticated state, as at the beginning. That means the next time theauthenticate
method will be invoked the authentication mechanism will be called again. -
isAuthenticated
public boolean isAuthenticated()Status of the Single Sign On.- Returns:
- true if the last authentication has not fail
-
authenticate
- Specified by:
authenticate
in classorg.jdesktop.swingx.auth.LoginService
- Throws:
Exception
-
authenticateOnce
public abstract boolean authenticateOnce(String name, char[] password, String server) throws ExceptionThis method is intended to be implemented by clients wishing to authenticate a user with a given password. \nThis mechanism is called only on the "unauthenticated" state. To return to the initial "unauthenticated" state, you may call thelogOff()
method.- Parameters:
name
- user namepassword
- user passwordserver
- server (optional)- Returns:
true
on authentication success- Throws:
Exception
- See Also:
logOff()
,isAuthenticated()
-