pub struct IdentityBinding {
pub authenticator: Authenticator,
pub subject: String,
pub person: String,
pub handle: Option<String>,
pub email: Option<VerifiedEmail>,
pub bound_at: i64,
pub bound_by: BindingOrigin,
}Expand description
Ties one external account to a person.
Fields§
§authenticator: AuthenticatorStored as a one-element array; merges atomically (ADR 0022 §“Merge
classes in sync terms”) so a concurrent change doesn’t mix variant
tags with bound_by’s other variant.
subject: StringThe platform’s stable user id, or the OIDC sub. The only lookup key.
person: StringThe person id this account belongs to.
handle: Option<String>A snapshot of the platform username, for display only.
email: Option<VerifiedEmail>Stored as a one-element array; merges atomically so a concurrent
change can’t pair one side’s address with the other’s verified.
bound_at: i64§bound_by: BindingOriginStored as a one-element array; merges atomically, since this is an externally-tagged enum and object-recursive merging of two different variants would produce an undecodable body.
Implementations§
Source§impl IdentityBinding
impl IdentityBinding
pub const KIND: RecordKind = RecordKind::IdentityBinding
Sourcepub fn key_for(
authenticator: &Authenticator,
subject: &str,
) -> Result<RecordKey, FleetKeyError>
pub fn key_for( authenticator: &Authenticator, subject: &str, ) -> Result<RecordKey, FleetKeyError>
fleet/identity-bindings/<authenticator>:<subject>.
pub fn key(&self) -> Result<RecordKey, FleetKeyError>
Trait Implementations§
Source§impl Clone for IdentityBinding
impl Clone for IdentityBinding
Source§fn clone(&self) -> IdentityBinding
fn clone(&self) -> IdentityBinding
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 IdentityBinding
impl Debug for IdentityBinding
Source§impl<'de> Deserialize<'de> for IdentityBinding
impl<'de> Deserialize<'de> for IdentityBinding
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
impl Eq for IdentityBinding
Source§impl PartialEq for IdentityBinding
impl PartialEq for IdentityBinding
Source§impl RecordCodec for IdentityBinding
impl RecordCodec for IdentityBinding
Source§impl Serialize for IdentityBinding
impl Serialize for IdentityBinding
impl StructuralPartialEq for IdentityBinding
Auto Trait Implementations§
impl Freeze for IdentityBinding
impl RefUnwindSafe for IdentityBinding
impl Send for IdentityBinding
impl Sync for IdentityBinding
impl Unpin for IdentityBinding
impl UnsafeUnpin for IdentityBinding
impl UnwindSafe for IdentityBinding
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