Adding attachment to identity
This commit is contained in:
4
go.mod
4
go.mod
@@ -3,16 +3,14 @@ module identity-manager
|
||||
go 1.25.0
|
||||
|
||||
require (
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1
|
||||
github.com/jackc/pgx/v5 v5.8.0
|
||||
golang.org/x/crypto v0.49.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
||||
golang.org/x/sync v0.20.0 // indirect
|
||||
golang.org/x/sys v0.42.0 // indirect
|
||||
golang.org/x/text v0.35.0 // indirect
|
||||
)
|
||||
|
||||
6
main.go
6
main.go
@@ -28,7 +28,13 @@ func main() {
|
||||
log.Fatal("Failed to load private key:", err)
|
||||
}
|
||||
|
||||
publicKey, err = libshared.LoadPublicKey("keys/public.pem")
|
||||
if err != nil {
|
||||
log.Fatal("Failed to load public key:", err)
|
||||
}
|
||||
|
||||
http.HandleFunc("/identity/create-local-identity", createLocalHandler)
|
||||
http.HandleFunc("/identity/allow-role-to-identity", allowRoleToIdentityHandler)
|
||||
http.HandleFunc("/identity/authenticate", authenticateHandler)
|
||||
|
||||
log.Println("server running on :8080")
|
||||
|
||||
Reference in New Issue
Block a user