Class InMemoryApiKeyRepository
java.lang.Object
com.codename1.backend.security.apikey.InMemoryApiKeyRepository
- All Implemented Interfaces:
ApiKeyRepository
API keys held in memory: for tests, and for a server whose few keys come
from its configuration. They are gone when the process ends, and each
instance of a server that runs as several has its own.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
InMemoryApiKeyRepository
-
-
Method Details
-
save
Adds a key, or replaces the one with the same hash. -
revoke
-
findByHash
Description copied from interface:ApiKeyRepositoryThe key with this hash, or null. A revoked key is returned like any other; refusing it is the caller's.- Specified by:
findByHashin interfaceApiKeyRepository- Parameters:
hash- the lowercase hexadecimal SHA-256 of a presented key
-
findAll
-