Package de.kosmos_lab.web.persistence
Interface ISesssionPersistence
-
- All Superinterfaces:
IPersistence
- All Known Implementing Classes:
JSONPersistence
public interface ISesssionPersistence extends IPersistence
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddJWT(String token)StringgetJWT(User user)get the jwt for a userorg.json.JSONObjectgetJWT(String jwtid)get the JWT with a specific jwtid back, if it is in the system and still validCollection<org.json.JSONObject>getMySessions(String username)intinitSesssions()voidkillJWT(String jwtid)org.json.JSONObjectverifyJWT(String token)verify the given jwt
-
-
-
Method Detail
-
addJWT
void addJWT(@Nonnull String token)
-
getJWT
org.json.JSONObject getJWT(@Nonnull String jwtid)get the JWT with a specific jwtid back, if it is in the system and still valid- Parameters:
jwtid- the id to find- Returns:
-
getJWT
String getJWT(@Nonnull User user) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException
get the jwt for a user- Parameters:
user-- Returns:
- Throws:
UnsupportedEncodingExceptionNoSuchAlgorithmExceptionInvalidKeyException
-
getMySessions
Collection<org.json.JSONObject> getMySessions(String username)
-
killJWT
void killJWT(String jwtid)
-
verifyJWT
org.json.JSONObject verifyJWT(@Nonnull String token)verify the given jwt- Parameters:
token-- Returns:
-
initSesssions
int initSesssions()
-
-