[−][src]Module tide::http::auth
HTTP authentication and authorization.
Examples
use http_types::Response; use http_types::auth::{AuthenticationScheme, BasicAuth}; let username = "nori"; let password = "secret_fish!!"; let authz = BasicAuth::new(username, password); let mut res = Response::new(200); authz.apply(&mut res); let authz = BasicAuth::from_headers(res)?.unwrap(); assert_eq!(authz.username(), username); assert_eq!(authz.password(), password);
Structs
Authorization | Credentials to authenticate a user agent with a server. |
BasicAuth | HTTP Basic authorization. |
WwwAuthenticate | Define the authentication method that should be used to gain access to a resource. |
Enums
AuthenticationScheme | HTTP Mutual Authentication Algorithms |