mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
17 lines
410 B
Go
17 lines
410 B
Go
package api
|
|
|
|
import (
|
|
"github.com/glueops/autoglue/internal/handlers"
|
|
"github.com/go-chi/chi/v5"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
func mountAuthRoutes(r chi.Router, db *gorm.DB) {
|
|
r.Route("/auth", func(a chi.Router) {
|
|
a.Post("/{provider}/start", handlers.AuthStart(db))
|
|
a.Get("/{provider}/callback", handlers.AuthCallback(db))
|
|
a.Post("/refresh", handlers.Refresh(db))
|
|
a.Post("/logout", handlers.Logout(db))
|
|
})
|
|
}
|