actix_web_httpauth/headers/www_authenticate/challenge/mod.rs
1use std::fmt::{Debug, Display};
2
3use actix_web::{http::header::TryIntoHeaderValue, web::Bytes};
4
5pub mod basic;
6pub mod bearer;
7
8/// Authentication challenge for `WWW-Authenticate` header.
9pub trait Challenge: TryIntoHeaderValue + Debug + Display + Clone + Send + Sync {
10 /// Converts the challenge into a bytes suitable for HTTP transmission.
11 fn to_bytes(&self) -> Bytes;
12}