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

public interface RegisteredClientRepository

Known subtypesInMemoryRegisteredClientRepository, JdbcRegisteredClientRepository

The clients an authorization server knows.

Methods

public abstract void save(RegisteredClient registeredClient)Stores registeredClient, in place of the one with its id if there is one.
public abstract RegisteredClient findById(String id)The client stored under this id, or null.
public abstract RegisteredClient findByClientId(String clientId)The client that calls itself this, or null.
public default List<RegisteredClient> findAll()Every client there is, when that is known as the server starts and does not change behind it; null otherwise, which is what a repository answers unless it says more.

Method details

save

public abstract void save(RegisteredClient registeredClient)
Stores registeredClient, in place of the one with its id if there is one.

findById

public abstract RegisteredClient findById(String id)
The client stored under this id, or null.

findByClientId

public abstract RegisteredClient findByClientId(String clientId)
The client that calls itself this, or null.

findAll

public default List<RegisteredClient> findAll()

Every client there is, when that is known as the server starts and does not change behind it; null otherwise, which is what a repository answers unless it says more.

The authorization server reads it once, to refuse to start over a mistake that every request would otherwise meet one at a time: a client with a secret, and nothing to check a secret with. A repository over a table that is written to while the server runs answers null, and such a mistake is then found when the client calls.