pub struct OidcIdentity {
pub id: String,
pub user_id: String,
pub provider: String,
pub subject: String,
pub email_at_link: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
One OIDC identity link row.
One row is inserted the first time a user signs in via a given provider;
subsequent sign-ins look up the same row and reuse the linked user_id.
The uniqueness constraint on (provider, subject) enforces the
one-subject-one-user invariant.
Fields§
§id: StringSurrogate id (uuid).
user_id: StringZLayer user account this identity resolves to.
provider: StringProvider slug matching OidcProviderConfig::name.
subject: StringThe sub claim from the provider’s ID token. Opaque.
email_at_link: Option<String>Email returned by the provider at link time (informational only).
created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Trait Implementations§
Source§impl Clone for OidcIdentity
impl Clone for OidcIdentity
Source§fn clone(&self) -> OidcIdentity
fn clone(&self) -> OidcIdentity
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 ComposeSchema for OidcIdentity
impl ComposeSchema for OidcIdentity
Source§impl Debug for OidcIdentity
impl Debug for OidcIdentity
Source§impl<'de> Deserialize<'de> for OidcIdentity
impl<'de> Deserialize<'de> for OidcIdentity
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 Serialize for OidcIdentity
impl Serialize for OidcIdentity
Auto Trait Implementations§
impl Freeze for OidcIdentity
impl RefUnwindSafe for OidcIdentity
impl Send for OidcIdentity
impl Sync for OidcIdentity
impl Unpin for OidcIdentity
impl UnsafeUnpin for OidcIdentity
impl UnwindSafe for OidcIdentity
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