@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, startAuthentication
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
protected 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
LoginService
authenticate
in class LoginService
name
- usernamepassword
- passwordserver
- server (optional)true
on authentication successException
public 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 © 2020. All rights reserved.