Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public interface ApiKeyRepository

Known subtypesInMemoryApiKeyRepository, JdbcApiKeyRepository

Where API keys are kept. An application declares a bean of this type, and http.apiKey(...) looks presented keys up in it.

Methods

public abstract ApiKey findByHash(String hash)The key with this hash, or null.

Method details

findByHash

public abstract ApiKey findByHash(String hash)
The key with this hash, or null. A revoked key is returned like any other; refusing it is the caller’s.

Parameters

hash String
the lowercase hexadecimal SHA-256 of a presented key