Updating JWT to use certificates

This commit is contained in:
2026-04-02 17:04:13 -04:00
parent 571aab64bb
commit 22a23c0062
6 changed files with 20 additions and 67 deletions

10
main.go
View File

@@ -1,6 +1,7 @@
package main
import (
"libshared"
"log"
"net/http"
)
@@ -9,7 +10,14 @@ func LoginHandler(w http.ResponseWriter, r *http.Request) {
}
func main() {
pool = getDbPool()
var err error
libshared.Pool = libshared.GetDbPool()
privateKey, err = libshared.LoadPrivateKey("keys/private.pem")
if err != nil {
log.Fatal("Failed to load private key:", err)
}
http.HandleFunc("/role/create-role", createRole)
http.HandleFunc("/role/attach-role", attachRole)