public class DbAuthenticator extends AbstractUsernamePasswordAuthenticator
AuthenticatorProfileCreator
.Modifier and Type | Field and Description |
---|---|
protected String |
attributes
This must a list of attribute names separated by commas.
|
protected DataSource |
dataSource |
protected org.skife.jdbi.v2.DBI |
dbi |
protected String |
endQuery |
protected org.slf4j.Logger |
logger |
protected String |
startQuery |
passwordEncoder
Constructor and Description |
---|
DbAuthenticator() |
DbAuthenticator(DataSource dataSource) |
DbAuthenticator(DataSource dataSource,
String attributes) |
DbAuthenticator(DataSource dataSource,
String attributes,
PasswordEncoder passwordEncoder) |
Modifier and Type | Method and Description |
---|---|
protected DbProfile |
createProfile(String username,
String[] attributes,
Map<String,Object> result) |
String |
getAttributes() |
DataSource |
getDataSource() |
String |
getEndQuery() |
String |
getStartQuery() |
protected void |
initDbi() |
void |
setAttributes(String attributes) |
void |
setDataSource(DataSource dataSource) |
void |
setEndQuery(String endQuery) |
void |
setStartQuery(String startQuery) |
void |
validate(UsernamePasswordCredentials credentials)
Validate the credentials.
|
getPasswordEncoder, setPasswordEncoder
protected final org.slf4j.Logger logger
protected org.skife.jdbi.v2.DBI dbi
protected DataSource dataSource
protected String attributes
protected String startQuery
protected String endQuery
public DbAuthenticator()
public DbAuthenticator(DataSource dataSource)
public DbAuthenticator(DataSource dataSource, String attributes)
public DbAuthenticator(DataSource dataSource, String attributes, PasswordEncoder passwordEncoder)
protected void initDbi()
public void validate(UsernamePasswordCredentials credentials)
UsernamePasswordAuthenticator
CredentialsException
in case of failure.credentials
- the given credentials.protected DbProfile createProfile(String username, String[] attributes, Map<String,Object> result)
public DataSource getDataSource()
public void setDataSource(DataSource dataSource)
public String getAttributes()
public void setAttributes(String attributes)
public String getStartQuery()
public void setStartQuery(String startQuery)
public String getEndQuery()
public void setEndQuery(String endQuery)
Copyright © 2016. All rights reserved.