Enum swagger::auth::AuthData
[−]
[src]
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]
fn clone(&self) -> AuthData
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for AuthData
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more