- Register by signing service key: GET /v1/service-key, POST /v1/auth/register-by-signature - Login auto-attempts register first for new users - Web: default API URL momswap.produktor.duckdns.org, /libs/ static handler - Docker: webbuild stage for geo-api-client, copy web+libs to runtime - Bin scripts: test.sh, run.sh, up.sh, down.sh - docs/ed25519-security-use-cases.md: use cases, message formats, examples - SERVICE_PUBLIC_KEY env (defaults to ADMIN_PUBLIC_KEY) Made-with: Cursor
This commit is contained in:
+2
-1
@@ -14,12 +14,13 @@ import (
|
||||
func main() {
|
||||
addr := getEnv("ADDR", ":8122")
|
||||
adminPublicKey := os.Getenv("ADMIN_PUBLIC_KEY")
|
||||
servicePublicKey := getEnv("SERVICE_PUBLIC_KEY", adminPublicKey)
|
||||
|
||||
memory := store.NewMemoryStore()
|
||||
service := app.NewService(memory, app.Config{
|
||||
ChallengeTTL: 5 * time.Minute,
|
||||
SessionTTL: 24 * time.Hour,
|
||||
})
|
||||
}, servicePublicKey)
|
||||
service.BootstrapAdmin(adminPublicKey)
|
||||
|
||||
api := httpapi.NewAPI(service)
|
||||
|
||||
Reference in New Issue
Block a user