| Constructor and Description |
|---|
LocksmithInMemory(Lock lock)
Defaul Constructor
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
create(String user,
String password)
Cria um nova chave se os dados recebidos forem validos.
|
String |
getUserByToken(String token)
Retorna o nome do usuario ao qual a chave pertence.
|
void |
invalidate(String key)
Destroy a chave com o token/usuario recebido como parametro.
|
Boolean |
isValid(String token)
Valida se a chave esta valido
|
public LocksmithInMemory(Lock lock)
lock - implementationpublic <T> T create(String user, String password) throws CredentialNotFoundException
create in interface LocksmithT - type of returnuser - usuáriopassword - senhaCredentialNotFoundException - caso usuario/senha não existam ou sejam incompativeispublic void invalidate(String key)
invalidate in interface Locksmithkey - usuario ou token que terá a sessão encerradapublic String getUserByToken(String token)
getUserByToken in interface Locksmithtoken - chave do usuarioCopyright © 2017. All rights reserved.