pub struct AuthContext {
pub provider: AuthProvider,
pub user_id: Option<String>,
pub user_email: Option<String>,
pub api_key_id: Option<String>,
}Expand description
Authentication context
Fields§
§provider: AuthProviderAuthentication provider used
user_id: Option<String>User ID (if available)
user_email: Option<String>User email (if available)
api_key_id: Option<String>API key identifier (if API key auth)
Implementations§
Source§impl AuthContext
impl AuthContext
Sourcepub fn new(provider: AuthProvider) -> Self
pub fn new(provider: AuthProvider) -> Self
Create a new authentication context
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Check if authentication is authenticated
Trait Implementations§
Source§impl Clone for AuthContext
impl Clone for AuthContext
Source§fn clone(&self) -> AuthContext
fn clone(&self) -> AuthContext
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 moreAuto Trait Implementations§
impl Freeze for AuthContext
impl RefUnwindSafe for AuthContext
impl Send for AuthContext
impl Sync for AuthContext
impl Unpin for AuthContext
impl UnsafeUnpin for AuthContext
impl UnwindSafe for AuthContext
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