public class JdbcAuthenticationService extends Object implements AuthenticationService, UserManagerService
| Modifier and Type | Class and Description |
|---|---|
class |
JdbcAuthenticationService.PasswordCheckRowCallback |
| Constructor and Description |
|---|
JdbcAuthenticationService(org.osgi.framework.BundleContext context,
String id) |
| Modifier and Type | Method and Description |
|---|---|
UserInformation |
authenticate(CredentialsRequest request)
Authenticate a user based on credentials
|
void |
dispose() |
UserInformation |
getUser(String username)
The the user information of the named user
|
protected void |
handleSetPassword(ConnectionContext connection,
String user,
String password) |
boolean |
isUserManager() |
void |
joinRequest(CredentialsRequest request) |
protected UserInformation |
performAuthentication(ConnectionContext connection,
String username,
Map<PasswordEncoding,String> passwords) |
protected UserInformation |
performLookup(ConnectionContext connection,
String username) |
protected void |
setDataSource(org.osgi.service.jdbc.DataSourceFactory service) |
void |
setPassword(String user,
String password) |
void |
update(Map<String,String> parameters) |
protected boolean |
validatePassword(Map<PasswordEncoding,String> providedPasswords,
String storedPassword) |
public JdbcAuthenticationService(org.osgi.framework.BundleContext context,
String id)
public void joinRequest(CredentialsRequest request)
joinRequest in interface AuthenticationServicepublic UserInformation authenticate(CredentialsRequest request) throws AuthenticationException
AuthenticationServiceauthenticate in interface AuthenticationServicenull if it is a valid anonymous login.AuthenticationException - in the case the login is invalid (e.g. username and
password don't match)protected UserInformation performAuthentication(ConnectionContext connection, String username, Map<PasswordEncoding,String> passwords) throws AuthenticationException, SQLException
AuthenticationExceptionSQLExceptionprotected boolean validatePassword(Map<PasswordEncoding,String> providedPasswords, String storedPassword)
public void dispose()
public UserInformation getUser(String username)
AuthenticationServicegetUser in interface AuthenticationServiceusername - the user to get the information fornull if the user is unknownprotected UserInformation performLookup(ConnectionContext connection, String username) throws SQLException
SQLExceptionprotected void setDataSource(org.osgi.service.jdbc.DataSourceFactory service)
public boolean isUserManager()
public void setPassword(String user, String password)
setPassword in interface UserManagerServiceprotected void handleSetPassword(ConnectionContext connection, String user, String password) throws Exception
ExceptionCopyright © 2016 Eclipse NeoSCADA Project. All rights reserved.