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 AuthenticationService
public UserInformation authenticate(CredentialsRequest request) throws AuthenticationException
AuthenticationService
authenticate
in interface AuthenticationService
null
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
AuthenticationException
SQLException
protected boolean validatePassword(Map<PasswordEncoding,String> providedPasswords, String storedPassword)
public void dispose()
public UserInformation getUser(String username)
AuthenticationService
getUser
in interface AuthenticationService
username
- the user to get the information fornull
if the user is unknownprotected UserInformation performLookup(ConnectionContext connection, String username) throws SQLException
SQLException
protected void setDataSource(org.osgi.service.jdbc.DataSourceFactory service)
public boolean isUserManager()
public void setPassword(String user, String password)
setPassword
in interface UserManagerService
protected void handleSetPassword(ConnectionContext connection, String user, String password) throws Exception
Exception
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.