public class JdbcTokenRepositoryImpl extends org.springframework.jdbc.core.support.JdbcDaoSupport implements PersistentTokenRepository
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CREATE_TABLE_SQL
Default SQL for creating the database table to store the tokens
|
static java.lang.String |
DEF_INSERT_TOKEN_SQL
The default SQL used by createNewToken
|
static java.lang.String |
DEF_REMOVE_USER_TOKENS_SQL
The default SQL used by removeUserTokens
|
static java.lang.String |
DEF_TOKEN_BY_SERIES_SQL
The default SQL used by the getTokenBySeries query
|
static java.lang.String |
DEF_UPDATE_TOKEN_SQL
The default SQL used by updateToken
|
Constructor and Description |
---|
JdbcTokenRepositoryImpl() |
Modifier and Type | Method and Description |
---|---|
void |
createNewToken(PersistentRememberMeToken token) |
PersistentRememberMeToken |
getTokenForSeries(java.lang.String seriesId)
Loads the token data for the supplied series identifier.
|
protected void |
initDao() |
void |
removeUserTokens(java.lang.String username) |
void |
setCreateTableOnStartup(boolean createTableOnStartup)
Intended for convenience in debugging.
|
void |
updateToken(java.lang.String series,
java.lang.String tokenValue,
java.util.Date lastUsed) |
public static final java.lang.String CREATE_TABLE_SQL
public static final java.lang.String DEF_TOKEN_BY_SERIES_SQL
public static final java.lang.String DEF_INSERT_TOKEN_SQL
public static final java.lang.String DEF_UPDATE_TOKEN_SQL
public static final java.lang.String DEF_REMOVE_USER_TOKENS_SQL
protected void initDao()
initDao
in class org.springframework.dao.support.DaoSupport
public void createNewToken(PersistentRememberMeToken token)
createNewToken
in interface PersistentTokenRepository
public void updateToken(java.lang.String series, java.lang.String tokenValue, java.util.Date lastUsed)
updateToken
in interface PersistentTokenRepository
public PersistentRememberMeToken getTokenForSeries(java.lang.String seriesId)
getTokenForSeries
in interface PersistentTokenRepository
seriesId
- public void removeUserTokens(java.lang.String username)
removeUserTokens
in interface PersistentTokenRepository
public void setCreateTableOnStartup(boolean createTableOnStartup)
createTableOnStartup
- set to true to execute the