@JavaBean public class JAASLoginService extends LoginService
| Modifier and Type | Field and Description |
|---|---|
protected LoginContext |
loginContext |
| Constructor and Description |
|---|
JAASLoginService()
Default JavaBeans constructor
|
JAASLoginService(String server)
Constructor for JAASLoginService
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
LoginContext |
getLoginContext()
Returns the
LoginContext used during the authentication
process. |
Subject |
getSubject()
Returns the
Subject representing the authenticated
individual, or null if the user has not yet been
successfully authenticated. |
addLoginListener, cancelAuthentication, getServer, getSynchronous, getUserRoles, removeLoginListener, setServer, setSynchronous, startAuthenticationaddPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListenerprotected LoginContext loginContext
public JAASLoginService(String server)
server - server name that is also used for the JAAS config namepublic JAASLoginService()
public boolean authenticate(String name, char[] password, String server) throws Exception
LoginServiceauthenticate in class LoginServicename - usernamepassword - passwordserver - server (optional)true on authentication successExceptionpublic LoginContext getLoginContext()
LoginContext used during the authentication
process.public Subject getSubject()
Subject representing the authenticated
individual, or null if the user has not yet been
successfully authenticated.Copyright © 2017. All Rights Reserved.