public class DataServiceTokenService extends Object implements TokenService
| Constructor and Description |
|---|
DataServiceTokenService(TokenGenerator tokenGenerator,
DataService dataService,
org.springframework.security.core.userdetails.UserDetailsService userDetailsService,
TokenFactory tokenFactory) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.userdetails.UserDetails |
findUserByToken(String token)
Find a user by a security token
|
String |
generateAndStoreToken(String username,
String description)
Generates a token and associates it with a user.
|
void |
removeToken(String token) |
public DataServiceTokenService(TokenGenerator tokenGenerator, DataService dataService, org.springframework.security.core.userdetails.UserDetailsService userDetailsService, TokenFactory tokenFactory)
@Transactional(readOnly=true) public org.springframework.security.core.userdetails.UserDetails findUserByToken(String token)
findUserByToken in interface TokenServicetoken - security token@Transactional public String generateAndStoreToken(String username, String description)
Token expires in 2 hours
generateAndStoreToken in interface TokenServiceusername - usernamedescription - token description@Transactional public void removeToken(String token)
removeToken in interface TokenServiceCopyright © 2017. All rights reserved.