32 lines
727 B
Go
32 lines
727 B
Go
package main
|
|
|
|
import (
|
|
"libshared"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
func LoginHandler(w http.ResponseWriter, r *http.Request) {
|
|
}
|
|
|
|
func main() {
|
|
|
|
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)
|
|
http.HandleFunc("/role/detach-role", detachRole)
|
|
http.HandleFunc("/role/assume-role", assumeRole)
|
|
http.HandleFunc("/role/get-role-token", getRoleToken)
|
|
//http.HandleFunc("/role/authorize-role", authorizeRole)
|
|
|
|
log.Println("server running on :8080")
|
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
|
}
|