Struct lightspeed_core::web::WebAuthService
source · pub struct WebAuthService<Id> { /* private fields */ }
Implementations§
source§impl<Id: IdType + MaybeWeb> WebAuthService<Id>
impl<Id: IdType + MaybeWeb> WebAuthService<Id>
pub fn new( auth_service: Arc<LsAuthService>, jwt_service: Arc<LsJwtService> ) -> Self
pub fn token_string_from_request<'a, H: Headers>( &self, req: &'a H ) -> Result<&'a str, LsError>
pub fn token_from_auth(&self, auth: &Auth<Id>) -> Result<String, LsError>
pub fn auth_from_request<H: Headers>( &self, req: &H ) -> Result<AuthContext<'_, Id>, LsError>
pub fn auth_from_token_string( &self, token: &str ) -> Result<AuthContext<'_, Id>, LsError>
Trait Implementations§
source§impl<Id: Clone> Clone for WebAuthService<Id>
impl<Id: Clone> Clone for WebAuthService<Id>
source§fn clone(&self) -> WebAuthService<Id>
fn clone(&self) -> WebAuthService<Id>
Returns a copy 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<Id> Freeze for WebAuthService<Id>
impl<Id> RefUnwindSafe for WebAuthService<Id>where
Id: RefUnwindSafe,
impl<Id> Send for WebAuthService<Id>where
Id: Send,
impl<Id> Sync for WebAuthService<Id>where
Id: Sync,
impl<Id> Unpin for WebAuthService<Id>where
Id: Unpin,
impl<Id> UnwindSafe for WebAuthService<Id>where
Id: UnwindSafe,
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