public class JAASLoginService extends LoginService
| Modifier and Type | Field and Description |
|---|---|
protected javax.security.auth.login.LoginContext |
loginContext |
| Constructor and Description |
|---|
JAASLoginService()
Default JavaBeans constructor
|
JAASLoginService(java.lang.String server)
Constructor for JAASLoginService
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
authenticate(java.lang.String name,
char[] password,
java.lang.String server)
This method is intended to be implemented by clients wishing to
authenticate a user with a given password.
|
javax.security.auth.login.LoginContext |
getLoginContext()
Returns the
LoginContext used during the authentication
process. |
javax.security.auth.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, removeVetoableChangeListenerpublic JAASLoginService(java.lang.String server)
server - server name that is also used for the JAAS config namepublic JAASLoginService()
public boolean authenticate(java.lang.String name,
char[] password,
java.lang.String server)
throws java.lang.Exception
LoginServiceauthenticate in class LoginServicename - usernamepassword - passwordserver - server (optional)true on authentication successjava.lang.Exceptionpublic javax.security.auth.login.LoginContext getLoginContext()
LoginContext used during the authentication
process.public javax.security.auth.Subject getSubject()
Subject representing the authenticated
individual, or null if the user has not yet been
successfully authenticated.