added feeds
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
use super::jwt;
|
||||
use actix_web::dev::ServiceRequest;
|
||||
|
||||
@@ -10,9 +9,13 @@ pub fn check_password(password: String) -> Result<String, &'static str> {
|
||||
}
|
||||
|
||||
pub fn extract_header_token(request: &ServiceRequest) -> Result<String, &'static str> {
|
||||
log::info!("Request: {:?}", request);
|
||||
match request.headers().get("user-token") {
|
||||
Some(token) => match token.to_str() {
|
||||
Ok(processed_password) => Ok(String::from(processed_password)),
|
||||
Ok(processed_password) => {
|
||||
log::info!("Token provided: {}", processed_password);
|
||||
Ok(String::from(processed_password))
|
||||
}
|
||||
Err(_processed_password) => Err("there was an error processing token"),
|
||||
},
|
||||
None => Err("there is no token"),
|
||||
|
||||
Reference in New Issue
Block a user