Class JAASLoginService
java.lang.Object
org.jdesktop.beans.AbstractBean
org.jdesktop.swingx.auth.LoginService
org.jdesktop.swingx.auth.JAASLoginService
JAASLoginService implements a LoginService
that uses JAAS for authentication. JAASLoginService uses the
server name as name of the configuration for JAAS.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault JavaBeans constructorJAASLoginService(String server) Constructor for JAASLoginService -
Method Summary
Modifier and TypeMethodDescriptionbooleanauthenticate(String name, char[] password, String server) This method is intended to be implemented by clients wishing to authenticate a user with a given password.Returns theLoginContextused during the authentication process.Returns theSubjectrepresenting the authenticated individual, ornullif the user has not yet been successfully authenticated.Methods inherited from class LoginService
addLoginListener, cancelAuthentication, fireLoginCanceled, fireLoginFailed, fireLoginStarted, fireLoginSucceeded, getServer, getSynchronous, getUserRoles, removeLoginListener, setServer, setSynchronous, startAuthenticationMethods inherited from class AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Field Details
-
LOG
-
loginContext
-
-
Constructor Details
-
JAASLoginService
Constructor for JAASLoginService- Parameters:
server- server name that is also used for the JAAS config name
-
JAASLoginService
public JAASLoginService()Default JavaBeans constructor
-
-
Method Details
-
authenticate
Description copied from class:LoginServiceThis method is intended to be implemented by clients wishing to authenticate a user with a given password. Clients should implement the authentication in a manner that the authentication can be cancelled at any time.- Specified by:
authenticatein classLoginService- Parameters:
name- usernamepassword- passwordserver- server (optional)- Returns:
trueon authentication success- Throws:
Exception
-
getLoginContext
Returns theLoginContextused during the authentication process. -
getSubject
Returns theSubjectrepresenting the authenticated individual, ornullif the user has not yet been successfully authenticated.
-