java.lang.Object |
↳ |
org.springframework.dao.support.DaoSupport |
|
↳ |
org.springframework.jdbc.core.support.JdbcDaoSupport |
|
|
↳ |
org.springframework.security.web.authentication.rememberme.JdbcTokenRepositoryImpl |
Class Overview
JDBC based persistent login token repository implementation.
Summary
[Expand]
Inherited Fields |
From class
org.springframework.dao.support.DaoSupport
protected
final
Log |
logger |
|
|
[Expand]
Inherited Methods |
From class
org.springframework.jdbc.core.support.JdbcDaoSupport
final
void
|
checkDaoConfig()
|
final
void
|
closeConnectionIfNecessary(Connection arg0)
|
JdbcTemplate
|
createJdbcTemplate(DataSource arg0)
|
final
Connection
|
getConnection()
|
final
DataSource
|
getDataSource()
|
final
SQLExceptionTranslator
|
getExceptionTranslator()
|
final
JdbcTemplate
|
getJdbcTemplate()
|
final
void
|
releaseConnection(Connection arg0)
|
final
void
|
setDataSource(DataSource arg0)
|
final
void
|
setJdbcTemplate(JdbcTemplate arg0)
|
|
From class
org.springframework.dao.support.DaoSupport
final
void
|
afterPropertiesSet()
|
abstract
void
|
checkDaoConfig()
|
void
|
initDao()
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.beans.factory.InitializingBean
abstract
void
|
afterPropertiesSet()
|
|
From interface
org.springframework.security.web.authentication.rememberme.PersistentTokenRepository
|
Constants
public
static
final
String
CREATE_TABLE_SQL
Default SQL for creating the database table to store the tokens
Constant Value:
"create table persistent_logins (username varchar(64) not null, series varchar(64) primary key, token varchar(64) not null, last_used timestamp not null)"
public
static
final
String
DEF_INSERT_TOKEN_SQL
The default SQL used by createNewToken
Constant Value:
"insert into persistent_logins (username, series, token, last_used) values(?,?,?,?)"
public
static
final
String
DEF_REMOVE_USER_TOKENS_SQL
The default SQL used by removeUserTokens
Constant Value:
"delete from persistent_logins where username = ?"
public
static
final
String
DEF_TOKEN_BY_SERIES_SQL
The default SQL used by the getTokenBySeries query
Constant Value:
"select username,series,token,last_used from persistent_logins where series = ?"
public
static
final
String
DEF_UPDATE_TOKEN_SQL
The default SQL used by updateToken
Constant Value:
"update persistent_logins set token = ?, last_used = ? where series = ?"
Public Constructors
public
JdbcTokenRepositoryImpl
()
Public Methods
Loads the token data for the supplied series identifier.
If an error occurs, it will be reported and null will be returned (since the result should just be a failed
persistent login).
Returns
- the token matching the series, or null if no match found or an exception occurred.
public
void
removeUserTokens
(String username)
public
void
setCreateTableOnStartup
(boolean createTableOnStartup)
Intended for convenience in debugging. Will create the persistent_tokens database table when the class
is initialized during the initDao method.
Parameters
createTableOnStartup
| set to true to execute the
|
Protected Methods
protected
void
initDao
()