Struct actix_web_httpauth::BasicAuth [] [src]

pub struct BasicAuth {
    pub username: String,
    pub password: String,
}

Extractor for Authorization: Basic {payload} HTTP request header.

If header is not present, HTTP 401 will be returned.

Example

use actix_web_httpauth::BasicAuth;

pub fn handler(auth: BasicAuth) -> String { format!("Hello, {}", auth.username) }

Fields

Trait Implementations

impl Debug for BasicAuth
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for BasicAuth
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<S> FromRequest<S> for BasicAuth
[src]

Configuration for conversion process

Future that resolves to a Self

[src]

Convert request to a Self

[src]

Convert request to a Self Read more

Auto Trait Implementations

impl Send for BasicAuth

impl Sync for BasicAuth