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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for LinkOAuthIdentityRequest
impl PartialEq for LinkOAuthIdentityRequest
impl StructuralPartialEq for LinkOAuthIdentityRequest
Auto Trait Implementations§
impl Freeze for LinkOAuthIdentityRequest
impl RefUnwindSafe for LinkOAuthIdentityRequest
impl Send for LinkOAuthIdentityRequest
impl Sync for LinkOAuthIdentityRequest
impl Unpin for LinkOAuthIdentityRequest
impl UnsafeUnpin for LinkOAuthIdentityRequest
impl UnwindSafe for LinkOAuthIdentityRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more