Package org.molgenis.security.core.token
Interface TokenService
-
public interface TokenServiceStore and remove molgenis security tokens
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.springframework.security.core.userdetails.UserDetailsfindUserByToken(String token)Find a user by a security tokenStringgenerateAndStoreToken(String username, String description)Generates a token and associates it with a user.voidremoveToken(String token)Remove a token from the store
-
-
-
Method Detail
-
generateAndStoreToken
String generateAndStoreToken(String username, String description)
Generates a token and associates it with a user. Token expires after 2 hours.
-
findUserByToken
org.springframework.security.core.userdetails.UserDetails findUserByToken(String token)
Find a user by a security token- Returns:
- the user or null if not found or token is expired
-
removeToken
void removeToken(String token)
Remove a token from the store
-
-