Cleaning up the code

This commit is contained in:
Ara Sadoyan
2025-10-24 15:27:15 +02:00
parent 21c4cb0901
commit 012505b77e
4 changed files with 54 additions and 74 deletions

View File

@@ -40,16 +40,6 @@ impl AuthValidator for JwtAuth<'_> {
if let Some(tok) = get_query_param(session, "araleztoken") {
return check_jwt(tok.as_str(), jwtsecret);
}
// if let Some(header) = session.get_header("authorization") {
// let h = header.to_str().ok().unwrap().split(" ").collect::<Vec<_>>();
// match h.len() {
// n => {
// return check_jwt(h[n - 1], jwtsecret);
// }
// }
// }
if let Some(auth_header) = session.get_header("authorization") {
if let Ok(header_str) = auth_header.to_str() {
if let Some((scheme, token)) = header_str.split_once(' ') {