Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class InMemoryRegisteredClientRepository
- Object
- InMemoryRegisteredClientRepository
ImplementsRegisteredClientRepository
Clients given when the server starts, and kept in this process.
Constructors
public InMemoryRegisteredClientRepository(RegisteredClient... registrations) |
Methods
public synchronized void save(RegisteredClient registeredClient) | Stores registeredClient, in place of the one with its id if there is one. |
public synchronized 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. |
public synchronized RegisteredClient findById(String id) | The client stored under this id, or null. |
public synchronized RegisteredClient findByClientId(String clientId) | The client that calls itself this, or null. |
Inherited methods
Constructor details
InMemoryRegisteredClientRepository
public InMemoryRegisteredClientRepository(RegisteredClient... registrations)Method details
save
public synchronized void save(RegisteredClient registeredClient)Stores
registeredClient, in place of the one with its id if there is
one.findAll
public synchronized 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.
findById
public synchronized RegisteredClient findById(String id)The client stored under this id, or null.
findByClientId
public synchronized RegisteredClient findByClientId(String clientId)The client that calls itself this, or null.