Documentation
¶
Overview ¶
Package credentialruntime defines transport-neutral contracts shared by the Vault application service and the outbound OAuth and MCP adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthSource ¶
type AuthSource interface {
ResolveMCPBearer(context.Context, string, string) (BearerCredential, bool, error)
}
AuthSource resolves the current credential for a Session and MCP URL. It is called for every outgoing MCP request so rotation, archival, and refresh take effect without restarting the Session.
type BearerCredential ¶
BearerCredential is a request-scoped runtime projection. Implementations must never persist or log Token.
type HTTPResponse ¶
type HTTPResponse struct {
Body string `json:"body"`
BodyTruncated bool `json:"body_truncated"`
ContentType string `json:"content_type"`
StatusCode int `json:"status_code"`
}
HTTPResponse is the bounded, scrubbed response projection exposed by OAuth validation. Adapters must remove credential material before populating Body.
type MCPProbeFailure ¶
type MCPProbeFailure struct {
Method string `json:"method"`
HTTPResponse *HTTPResponse `json:"http_response"`
}
type MCPProbeResult ¶
type MCPProbeResult struct {
Verdict Verdict
Failure *MCPProbeFailure
}
type MCPValidator ¶
type MCPValidator interface {
ValidateBearer(context.Context, string, string) (MCPProbeResult, error)
}
MCPValidator live-probes initialize and tools/list with a supplied bearer.
type OAuthRefreshRequest ¶
type OAuthRefreshResult ¶
type OAuthRefreshResult struct {
Status OAuthRefreshStatus
Verdict Verdict
HTTPResponse *HTTPResponse
AccessToken string
RefreshToken *string
ExpiresIn *time.Duration
}
type OAuthRefreshStatus ¶
type OAuthRefreshStatus string
const ( OAuthRefreshSucceeded OAuthRefreshStatus = "succeeded" OAuthRefreshFailed OAuthRefreshStatus = "failed" OAuthRefreshConnectError OAuthRefreshStatus = "connect_error" )
type OAuthRefresher ¶
type OAuthRefresher interface {
Refresh(context.Context, OAuthRefreshRequest) (OAuthRefreshResult, error)
}