pub struct AuthRequest {
pub authorization_header: Option<String>,
}Expand description
Request context for authentication validation
Contains information extracted from an HTTP request.
Fields§
Raw Authorization header value (e.g., “Bearer eyJhbG…”)
Implementations§
Source§impl AuthRequest
impl AuthRequest
Sourcepub fn new(authorization_header: Option<String>) -> Self
pub fn new(authorization_header: Option<String>) -> Self
Create a new auth request from an authorization header
Sourcepub fn extract_bearer_token(&self) -> Result<String>
pub fn extract_bearer_token(&self) -> Result<String>
Extract the bearer token from the Authorization header
Expected format: "Bearer <token>"
Returns Ok(token) if valid format, Err otherwise
Trait Implementations§
Source§impl Clone for AuthRequest
impl Clone for AuthRequest
Source§fn clone(&self) -> AuthRequest
fn clone(&self) -> AuthRequest
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 AuthRequest
impl RefUnwindSafe for AuthRequest
impl Send for AuthRequest
impl Sync for AuthRequest
impl Unpin for AuthRequest
impl UnsafeUnpin for AuthRequest
impl UnwindSafe for AuthRequest
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