Updating JWT to use certificates
This commit is contained in:
10
main.go
10
main.go
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user