public class JdbcTokenRepositoryImpl extends JdbcDaoSupport implements PersistentTokenRepository
| Modifier and Type | Field and Description |
|---|---|
static String |
CREATE_TABLE_SQL
Default SQL for creating the database table to store the tokens
|
static String |
DEF_INSERT_TOKEN_SQL
The default SQL used by createNewToken
|
static String |
DEF_REMOVE_USER_TOKENS_SQL
The default SQL used by removeUserTokens
|
static String |
DEF_TOKEN_BY_SERIES_SQL
The default SQL used by the getTokenBySeries query
|
static String |
DEF_UPDATE_TOKEN_SQL
The default SQL used by updateToken
|
logger| Constructor and Description |
|---|
JdbcTokenRepositoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
createNewToken(PersistentRememberMeToken token) |
PersistentRememberMeToken |
getTokenForSeries(String seriesId)
Loads the token data for the supplied series identifier.
|
protected void |
initDao() |
void |
removeUserTokens(String username) |
void |
setCreateTableOnStartup(boolean createTableOnStartup)
Intended for convenience in debugging.
|
void |
updateToken(String series,
String tokenValue,
Date lastUsed) |
checkDaoConfig, createJdbcTemplate, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, initTemplateConfig, releaseConnection, setDataSource, setJdbcTemplateafterPropertiesSetpublic static final String CREATE_TABLE_SQL
public static final String DEF_TOKEN_BY_SERIES_SQL
public static final String DEF_INSERT_TOKEN_SQL
public static final String DEF_UPDATE_TOKEN_SQL
public static final String DEF_REMOVE_USER_TOKENS_SQL
protected void initDao()
initDao in class DaoSupportpublic void createNewToken(PersistentRememberMeToken token)
createNewToken in interface PersistentTokenRepositorypublic void updateToken(String series, String tokenValue, Date lastUsed)
updateToken in interface PersistentTokenRepositorypublic PersistentRememberMeToken getTokenForSeries(String seriesId)
getTokenForSeries in interface PersistentTokenRepositoryseriesId - public void removeUserTokens(String username)
removeUserTokens in interface PersistentTokenRepositorypublic void setCreateTableOnStartup(boolean createTableOnStartup)
createTableOnStartup - set to true to execute the