Struct actix_web_httpauth::basic::BasicAuth [] [src]

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

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

If header is not present or malformed, HTTP 401 response will be returned. See Config struct also.

Example

As a handler-level extractor:

use actix_web_httpauth::basic::BasicAuth;

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

See examples/basic.rs file in sources

Fields

Methods

impl BasicAuth
[src]

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