feat(auth): Add /token endpoint to request a access token

This commit is contained in:
Björn Benouarets
2026-01-27 11:19:52 +01:00
parent 346100feb6
commit d8241a2491
19 changed files with 418 additions and 14 deletions

View File

@@ -31,6 +31,10 @@ func main() {
allModels := []interface{}{
&models.User{},
&models.Tenant{},
&models.Token{},
&models.Session{},
&models.Application{},
&models.Authorization{},
}
dbConfig := database.NewDatabaseConfigurationFromConfig(config)
@@ -62,6 +66,7 @@ func main() {
// Controllers
app.Post("/authorize", controllers.AuthorizeController)
app.Post("/token", controllers.TokenController)
masterlog.Info("Starting server", map[string]interface{}{"address": config.Address})
if err := app.Listen(config.Address); err != nil {