feat(auth): Add /token endpoint to request a access token
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user