You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

14 lines
385 B

use actix_web_httpauth::extractors::basic::BasicAuth;
// use actix_identity::Identity;
use actix_web::{dev::ServiceRequest, Error};
pub async fn validator(
req: ServiceRequest,
credentials: BasicAuth,
) -> Result<ServiceRequest, Error> {
println!("{}", credentials.user_id());
println!("{:?}", credentials.password());
// verify credentials from db
Ok(req)
}