Interface McpClientAuthProvider
public interface McpClientAuthProvider
MCP client authentication providers can be used to supply credentials such as access tokens, API keys, and other type of
credentials.
Providers which support a specific named MCP Client only must be annotated with a McpClientName annotation.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionProvide authorization data which will be set as an HTTP Authorization header value.static Optional<McpClientAuthProvider> Resolve McpClientAuthProvider.
-
Method Details
-
getAuthorization
Provide authorization data which will be set as an HTTP Authorization header value.- Parameters:
input- representation of an HTTP request to the model provider.- Returns:
- authorization data which must include an HTTP Authorization scheme value, for example: "Bearer the_access_token". Returning null will result in no Authorization header being set.
-
resolve
Resolve McpClientAuthProvider.- Parameters:
mcpClientName- the MCP client name. If it is not null then a McpClientAuthProvider with a matchingMcpClientNameannotation are preferred to a global McpClientAuthProvider.- Returns:
- Resolved McpClientAuthProvider as an Optional value which will be empty if no McpClientAuthProvider is available.
-