Skip to main content

Module oauth

Module oauth 

Source
Expand description

OAuth 2.1 for MCP HTTP / OpenAPI / GraphQL — wraps rmcp::transport::auth.

Credentials and sticky redirect metadata live under $SKIFF_CACHE_DIR/oauth/<server-hash>/ with 0o700 dirs and 0o600 files. Authorization-code callbacks bind loopback only; sticky URIs are re-validated.

Structs§

FileCredentialStore
OAuthOptions
Resolved OAuth options after secret resolution and validation.
OAuthReady
Ready-to-use OAuth session wrapping rmcp AuthClient.

Enums§

OAuthFlow

Functions§

authorize
Run OAuth (or restore cached tokens) and return an authorized client.
clear_oauth_credentials
discovery_url_from_args
Discoverable server URL for OAuth metadata (MCP URL, or OpenAPI HTTP base).
find_free_port
oauth_dir_for_server
oauth_wanted
Whether any OAuth flag requests auth.
options_from_args
Validate CLI oauth flags and resolve secrets into OAuthOptions.
parse_oauth_flow
port_available
resolve_redirect_uri
Resolve redirect URI: explicit validated URI, sticky cached, or fresh free port.
server_hash
setup_from_args
Convenience: setup from GlobalArgs if oauth wanted.
validate_redirect_uri
Validate --oauth-redirect-uri: http, loopback host, explicit port.