#[non_exhaustive]pub struct ProviderIdentity {
pub provider: String,
pub issuer: String,
pub subject: String,
pub email: Option<String>,
pub email_verified: bool,
pub name: Option<String>,
pub claims: Map<String, Value>,
}Expand description
Who an OpenID Connect provider says signed in, once the panel has checked its ID token: the token came from the provider’s token endpoint, names the panel’s client, has not expired and carries the nonce this sign-in sent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.provider: StringThe provider’s key, such as google.
issuer: StringThe provider’s issuer, such as https://accounts.google.com.
subject: StringThe provider’s id for the account (sub): with the issuer, the one stable name of the
account. An email address can change hands; this cannot.
email: Option<String>The account’s email address, as the provider has it.
email_verified: boolWhether the provider says the account proved it reads email.
name: Option<String>The account’s display name.
claims: Map<String, Value>Every claim of the ID token, such as Google’s hd, the Workspace domain of the account:
what a linker reads that the fields above do not carry.
Implementations§
Source§impl ProviderIdentity
impl ProviderIdentity
Sourcepub fn new(
provider: impl Into<String>,
issuer: impl Into<String>,
subject: impl Into<String>,
) -> Self
pub fn new( provider: impl Into<String>, issuer: impl Into<String>, subject: impl Into<String>, ) -> Self
The account subject at the provider keyed provider whose issuer is issuer, with no
address, name or other claim: for a test of an IdentityLinker, which adds them with
with_email, with_name and
with_claim.
Sourcepub fn with_email(self, email: impl Into<String>, verified: bool) -> Self
pub fn with_email(self, email: impl Into<String>, verified: bool) -> Self
This identity holding email, which the provider verified or not.
Trait Implementations§
Source§impl Clone for ProviderIdentity
impl Clone for ProviderIdentity
Source§impl Debug for ProviderIdentity
impl Debug for ProviderIdentity
impl Eq for ProviderIdentity
Source§impl PartialEq for ProviderIdentity
impl PartialEq for ProviderIdentity
impl StructuralPartialEq for ProviderIdentity
Auto Trait Implementations§
impl Forget for ProviderIdentity
impl Freeze for ProviderIdentity
impl Move for ProviderIdentity
impl RefUnwindSafe for ProviderIdentity
impl Send for ProviderIdentity
impl Sync for ProviderIdentity
impl Unpin for ProviderIdentity
impl UnsafeUnpin for ProviderIdentity
impl UnwindSafe for ProviderIdentity
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.