pub struct LinkOAuthIdentityRequest {
pub provider: String,
pub webauthn_assertion: Option<Vec<u8>>,
pub client_operation_id: String,
pub oauth_proof: Option<OauthProof>,
}Fields§
§provider: StringWhich OAuth provider this proof is from. Used by the server to pick the correct ID-token verifier (JWKS for Google/Apple, /user + /user/emails API path for GitHub).
“google” | “apple” | “github”
webauthn_assertion: Option<Vec<u8>>OPTIONAL: a fresh WebAuthn assertion proving ownership of the existing user account that this OAuth identity is being attached to. Required only when the OAuth-validated email collides with an existing user (per the email-collision passkey gate, weft spike §4.6); otherwise empty.
client_operation_id: String§oauth_proof: Option<OauthProof>The provider’s cryptographic proof of identity.
- Google / Apple: OIDC
id_token(provider-signed JWT). - GitHub: OAuth2 access token (server validates via /user + /user/emails).
Server validates this proof and extracts
(sub, email, email_verified) from the verified result; the
request itself carries NO user-identity claims the caller can
forge. Closes the OAuth-link forge bypass surfaced on
HeddleCo/weft#193 r2 (Codex cid 3294026240); design rationale
in the HeddleCo/weft#195 spike amendment.
Implementations§
Source§impl LinkOAuthIdentityRequest
impl LinkOAuthIdentityRequest
Sourcepub fn webauthn_assertion(&self) -> &[u8] ⓘ
pub fn webauthn_assertion(&self) -> &[u8] ⓘ
Returns the value of webauthn_assertion, or the default value if webauthn_assertion is unset.
Trait Implementations§
Source§impl Clone for LinkOAuthIdentityRequest
impl Clone for LinkOAuthIdentityRequest
Source§fn clone(&self) -> LinkOAuthIdentityRequest
fn clone(&self) -> LinkOAuthIdentityRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LinkOAuthIdentityRequest
impl Debug for LinkOAuthIdentityRequest
Source§impl Default for LinkOAuthIdentityRequest
impl Default for LinkOAuthIdentityRequest
impl Eq for LinkOAuthIdentityRequest
Source§impl Hash for LinkOAuthIdentityRequest
impl Hash for LinkOAuthIdentityRequest
Source§impl Message for LinkOAuthIdentityRequest
impl Message for LinkOAuthIdentityRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.