Ugly fix for removing bearer prefix from auth header
This commit is contained in:
parent
c5a25ad714
commit
e946dc456d
1 changed files with 3 additions and 1 deletions
|
@ -75,7 +75,9 @@ pub async fn engage_post(
|
||||||
.to_str()
|
.to_str()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let claims = auth.decode(token);
|
// Remove the Bearer prefix
|
||||||
|
let token = token.replace("Bearer ", "");
|
||||||
|
let claims = auth.decode(&token);
|
||||||
|
|
||||||
if let Err(e) = claims {
|
if let Err(e) = claims {
|
||||||
info!("Error validating token: {}", e);
|
info!("Error validating token: {}", e);
|
||||||
|
|
Loading…
Reference in a new issue