WebUI: add a token validation mode that allows checking the signature

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-09-21 14:06:25 +02:00
parent 5f67fcdce5
commit 433d45ed87
15 changed files with 485 additions and 85 deletions

View File

@@ -95,6 +95,10 @@ func validateJWTToken(w http.ResponseWriter, r *http.Request, audience tokenAudi
doRedirect("Your token is not valid", nil)
return err
}
if err := checkTokenSignature(r, token); err != nil {
doRedirect("Your token is no longer valid", nil)
return err
}
return nil
}