Public declaration syntax from forge-rs/crates/forge-mcp/src/auth.rs Original source SHA-256: cc21378a8aae74472b4d803ae8666bdf38f91e82ac42b4c88d09be0223512f98 Function bodies and constant values are omitted. This is not the complete implementation. Source line 37 #[derive(Debug, Clone, PartialEq, Eq)] pub struct OAuthConfig { /// The OAuth client ID registered with the authorization server. pub client_id: String, /// The OAuth client secret, if the client is confidential. /// /// Public clients (e.g., CLI tools) should leave this as `None` /// and rely on PKCE for security. pub client_secret: Option, /// The redirect URI for receiving the authorization code. pub redirect_uri: String, /// The authorization endpoint URL. pub auth_url: String, /// The token endpoint URL for exchanging codes for tokens. pub token_url: String } Source line 72 #[derive(Debug, Clone, PartialEq, Eq)] pub struct PkceChallenge { /// The code verifier -- a high-entropy random string sent during /// the token exchange. pub verifier: String, /// The code challenge -- the SHA-256 hash of the verifier, Base64url-encoded. /// Sent during the authorization request. pub challenge: String, /// The challenge method (always "S256" for SHA-256). pub method: String } Source line 116 pub fn generate_pkce_challenge(verifier_bytes: &[u8]) -> ForgeMcpResult;