Skip to main content

protocol_droid/domain/oauth/
mod.rs

1//! OAuth machinery that is not MCP-specific.
2//!
3//! The version gating — which revision requires what — lives in
4//! `domain::mcp::authorization`, because
5//! that is MCP's half. What follows from the gate is OAuth's own vocabulary,
6//! and it is protocol-neutral: a PKCE verifier is described by RFC 7636 and
7//! knows nothing about a tool call.
8//!
9//! Gated on `oauth` even though `domain::mcp::authorization` is not. The
10//! authorization *model* is pure data and costs a lean build nothing, so
11//! gating it would take away the thing every consumer needs to read a
12//! revision's requirements. This module pulls a SHA-256 implementation and a
13//! base64url codec, which is a real cost for a consumer that only embeds the IR
14//! and the codecs.
15
16pub mod challenge;
17pub mod discovery;
18pub mod issued_token;
19pub mod issuer;
20pub mod pkce;
21pub mod registration;
22pub mod resource;
23
24pub use issued_token::{AccessToken, IssuedToken, RefreshToken, TokenResponseError};
25pub use issuer::{
26    AuthorizationResponseError, check_response_issuer, check_response_issuer_advertised,
27};
28pub use pkce::{ChallengeMethod, CodeChallenge, CodeVerifier, PkceError};
29pub use registration::{
30    ClientId, ClientIdError, ClientSecret, RegisteredClient, RegistrationDecision, TokenAuthMethod,
31    decide_registration,
32};
33pub use resource::{ResourceBinding, ResourceIndicatorError, ResourceParameters};