pub enum AuthIdentity {
Basic {
username: String,
},
Jwt {
username: String,
claims: Value,
},
OAuth {
email: Option<String>,
provider: String,
claims: Value,
},
Mtls {
username: String,
cn: String,
sans: Vec<String>,
},
}Expand description
Authentication identity — the result of successful authentication.
Represents WHO the user is (authentication), not what they can do
(authorization). Mapped to a User with Role per-application
during authorization.
Variants§
Basic
Basic auth user (username verified via password)
Jwt
JWT auth user (username from validated token)
OAuth
OAuth user (identity from external provider)
Fields
Mtls
mTLS user (identity from client certificate)
Implementations§
Trait Implementations§
Source§impl Clone for AuthIdentity
impl Clone for AuthIdentity
Source§fn clone(&self) -> AuthIdentity
fn clone(&self) -> AuthIdentity
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 AuthIdentity
impl Debug for AuthIdentity
Source§impl<'de> Deserialize<'de> for AuthIdentity
impl<'de> Deserialize<'de> for AuthIdentity
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
Auto Trait Implementations§
impl Freeze for AuthIdentity
impl RefUnwindSafe for AuthIdentity
impl Send for AuthIdentity
impl Sync for AuthIdentity
impl Unpin for AuthIdentity
impl UnsafeUnpin for AuthIdentity
impl UnwindSafe for AuthIdentity
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