User

Struct User 

Source
pub struct User {
    pub created_at: f64,
    pub custom_metadata: Option<CustomMetadata>,
    pub has_accepted_terms: bool,
    pub id: String,
    pub is_guest: bool,
    pub linked_accounts: Vec<LinkedAccount>,
    pub mfa_methods: Vec<UserMfaMethodsItem>,
}
Expand description

User

JSON schema
{
 "examples": [
   {
     "created_at": 1731974895,
     "has_accepted_terms": true,
     "id": "did:privy:cm3np4u9j001rc8b73seqmqqk",
     "is_guest": false,
     "linked_accounts": [
       {
         "address": "tom.bombadill@privy.io",
         "first_verified_at": 1674788927,
         "latest_verified_at": 1674788927,
         "type": "email",
         "verified_at": 1674788927
       },
       {
         "bio": "engineering at /privy. building pixelpool.xyz, the
first Farcaster video client. nyc. ๐Ÿ‘จโ€๐Ÿ’ป๐ŸŽ๐Ÿณ๏ธโ€๐ŸŒˆ  nf.td/payton",
         "display_name": "payton โ†‘",
         "fid": 4423,
         "first_verified_at": 1740678402,
         "latest_verified_at": 1741194370,
         "owner_address": "0xE6bFb4137F3A8C069F98cc775f324A84FE45FdFF",
         "profile_picture": "https://supercast.mypinata.cloud/ipfs/QmNexfCxdnFzWdJqKVgrjd27UGLMexNaw5FXu1XKR3cQF7?filename=IMG_2799.png",
         "profile_picture_url": "https://supercast.mypinata.cloud/ipfs/QmNexfCxdnFzWdJqKVgrjd27UGLMexNaw5FXu1XKR3cQF7?filename=IMG_2799.png",
         "type": "farcaster",
         "username": "payton",
         "verified_at": 1740678402
       },
       {
         "authenticator_name": "1Password",
         "created_with_browser": "Chrome",
         "created_with_device": "Macintosh",
         "created_with_os": "Mac OS",
         "credential_id":
"Il5vP-3Tm3hNmDVBmDlREgXzIOJnZEaiVnT-XMliXe-BufP9GL1-d3qhozk9IkZwQ_",
         "enrolled_in_mfa": true,
         "first_verified_at": 1741194420,
         "latest_verified_at": 1741194420,
         "public_key":
"pQECAyYgASFYIKdGwx5XxZ/7CJJzT8d5L6jyLNQdTH7X+rSZdPJ9Ux/
QIlggRm4OcJ8F3aB5zYz3T9LxLdDfGpWvYkHgS4A8tPz9CqE=",
         "type": "passkey",
         "verified_at": 1741194420
       }
     ],
     "mfa_methods": [
       {
         "type": "passkey",
         "verified_at": 1741194420
       }
     ]
   }
 ],
 "type": "object",
 "required": [
   "created_at",
   "has_accepted_terms",
   "id",
   "is_guest",
   "linked_accounts",
   "mfa_methods"
 ],
 "properties": {
   "created_at": {
     "description": "Unix timestamp of when the user was created in
milliseconds.",
     "type": "number"
   },
   "custom_metadata": {
     "$ref": "#/components/schemas/CustomMetadata"
   },
   "has_accepted_terms": {
     "description": "Indicates if the user has accepted the terms of
service.",
     "type": "boolean"
   },
   "id": {
     "type": "string"
   },
   "is_guest": {
     "description": "Indicates if the user is a guest account user.",
     "type": "boolean"
   },
   "linked_accounts": {
     "type": "array",
     "items": {
       "$ref": "#/components/schemas/LinkedAccount"
     }
   },
   "mfa_methods": {
     "type": "array",
     "items": {
       "oneOf": [
         {
           "$ref": "#/components/schemas/PasskeyMfaMethod"
         },
         {
           "$ref": "#/components/schemas/SmsMfaMethod"
         },
         {
           "$ref": "#/components/schemas/TotpMfaMethod"
         }
       ]
     }
   }
 }
}

Fieldsยง

ยงcreated_at: f64ยงcustom_metadata: Option<CustomMetadata>ยงhas_accepted_terms: bool

Indicates if the user has accepted the terms of service.

ยงid: Stringยงis_guest: bool

Indicates if the user is a guest account user.

ยงlinked_accounts: Vec<LinkedAccount>ยงmfa_methods: Vec<UserMfaMethodsItem>

Trait Implementationsยง

Sourceยง

impl Clone for User

Sourceยง

fn clone(&self) -> User

Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl Debug for User

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl<'de> Deserialize<'de> for User

Sourceยง

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl From<&User> for User

Sourceยง

fn from(value: &User) -> Self

Converts to this type from the input type.
Sourceยง

impl Serialize for User

Sourceยง

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> PolicyExt for T
where T: ?Sized,

Sourceยง

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Sourceยง

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,