Class InMemoryMcpClientRegistrationStore
java.lang.Object
org.apache.juneau.rest.client.mcp.auth.InMemoryMcpClientRegistrationStore
- All Implemented Interfaces:
McpClientRegistrationStore
public class InMemoryMcpClientRegistrationStore
extends Object
implements McpClientRegistrationStore
Thread-safe, process-scoped default
McpClientRegistrationStore keying registrations by
issuer.toString() (SEP-2352 "separate registration state per authorization server").
Holds credential material in memory only; nothing is persisted across process restarts and nothing is logged
(toString() discloses only the set of stored issuers, never credential material).
- Since:
- 10.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the registration stored for the given AS issuer, if any.voidput(URI issuer, McpClientRegistration registration) Stores (or replaces) the registration for the given AS issuer.voidRemoves any registration stored for the given AS issuer.intsize()Returns the number of stored registrations.toString()
-
Constructor Details
-
InMemoryMcpClientRegistrationStore
public InMemoryMcpClientRegistrationStore()
-
-
Method Details
-
find
Description copied from interface:McpClientRegistrationStoreReturns the registration stored for the given AS issuer, if any.- Specified by:
findin interfaceMcpClientRegistrationStore- Parameters:
issuer- The authorization serverissueridentifier. Must not benull .- Returns:
- The stored registration, or
Optional.empty()if none is stored for that issuer.
-
put
Description copied from interface:McpClientRegistrationStoreStores (or replaces) the registration for the given AS issuer.- Specified by:
putin interfaceMcpClientRegistrationStore- Parameters:
issuer- The authorization serverissueridentifier. Must not benull .registration- The registration to store. Must not benull .
-
remove
Description copied from interface:McpClientRegistrationStoreRemoves any registration stored for the given AS issuer.- Specified by:
removein interfaceMcpClientRegistrationStore- Parameters:
issuer- The authorization serverissueridentifier. Must not benull .
-
size
Returns the number of stored registrations.- Returns:
- The entry count.
-
toString
-