mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(api): add /auth/whoami endpoint for identity detection
This commit is contained in:
@@ -203,6 +203,7 @@ func main() {
|
||||
masterHandler := api.NewMasterHandler(db, logDB, masterService, syncService, statsService, logPartitioner)
|
||||
internalHandler := api.NewInternalHandler(db)
|
||||
featureHandler := api.NewFeatureHandler(rdb)
|
||||
authHandler := api.NewAuthHandler(db, rdb, adminService, masterService)
|
||||
modelRegistryService := service.NewModelRegistryService(db, rdb, service.ModelRegistryConfig{
|
||||
Enabled: cfg.ModelRegistry.Enabled,
|
||||
RefreshEvery: time.Duration(cfg.ModelRegistry.RefreshSeconds) * time.Second,
|
||||
@@ -356,6 +357,12 @@ func main() {
|
||||
masterGroup.GET("/stats", masterHandler.GetSelfStats)
|
||||
}
|
||||
|
||||
// Auth Routes (public, no middleware - self-validates token)
|
||||
authGroup := r.Group("/auth")
|
||||
{
|
||||
authGroup.GET("/whoami", authHandler.Whoami)
|
||||
}
|
||||
|
||||
// Public/General Routes (if any)
|
||||
r.POST("/logs", handler.IngestLog)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user