[][src]Enum swagger::auth::AuthData

pub enum AuthData {
    Basic(Basic),
    Bearer(Bearer),
    ApiKey(String),
}

Storage of raw authentication data, used both for storing incoming request authentication, and for authenticating outgoing client requests.

Variants

Basic(Basic)

HTTP Basic auth.

Bearer(Bearer)

HTTP Bearer auth, used for OAuth2.

ApiKey(String)

Header-based or query parameter-based API key auth.

Methods

impl AuthData[src]

pub fn basic(username: &str, password: &str) -> Self[src]

Set Basic authentication

pub fn bearer(token: &str) -> Self[src]

Set Bearer token authentication

pub fn apikey(apikey: &str) -> Self[src]

Set ApiKey authentication

Trait Implementations

impl Clone for AuthData[src]

impl Debug for AuthData[src]

impl PartialEq<AuthData> for AuthData[src]

impl StructuralPartialEq for AuthData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.