pub struct OAuth2Account {
pub id: String,
pub user_id: String,
pub provider: String,
pub provider_user_id: String,
pub name: String,
pub email: String,
pub picture: Option<String>,
pub metadata: Value,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}
Expand description
Represents an OAuth2 account linked to a user
This struct contains information about an OAuth2 account that has been authenticated and linked to a user in the system. It stores both the provider-specific information and internal tracking data.
Fields§
§id: String
Unique identifier for this OAuth2 account in our system
user_id: String
Internal user ID this OAuth2 account is linked to
provider: String
OAuth2 provider name (e.g., “google”)
provider_user_id: String
User identifier from the OAuth2 provider
name: String
User’s display name from the OAuth2 provider
email: String
User’s email address from the OAuth2 provider
picture: Option<String>
Optional URL to user’s profile picture
metadata: Value
Additional provider-specific metadata as JSON
created_at: DateTime<Utc>
When this OAuth2 account was first linked
updated_at: DateTime<Utc>
When this OAuth2 account was last updated
Trait Implementations§
Source§impl Clone for OAuth2Account
impl Clone for OAuth2Account
Source§fn clone(&self) -> OAuth2Account
fn clone(&self) -> OAuth2Account
Returns a duplicate of the value. Read more
1.0.0 · 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 OAuth2Account
impl Debug for OAuth2Account
Source§impl Default for OAuth2Account
impl Default for OAuth2Account
Source§impl<'de> Deserialize<'de> for OAuth2Account
impl<'de> Deserialize<'de> for OAuth2Account
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<'a, R: Row> FromRow<'a, R> for OAuth2Account
impl<'a, R: Row> FromRow<'a, R> for OAuth2Account
Auto Trait Implementations§
impl Freeze for OAuth2Account
impl RefUnwindSafe for OAuth2Account
impl Send for OAuth2Account
impl Sync for OAuth2Account
impl Unpin for OAuth2Account
impl UnwindSafe for OAuth2Account
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more