refactor: use ticket approach for oidc flow

This commit is contained in:
Stavros
2026-06-01 17:04:08 +03:00
parent 97e0e0dfff
commit 2454ba58ea
9 changed files with 99 additions and 192 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ func (app *BootstrapApp) setupRouter() error {
controller.NewContextController(app.log, app.config, app.runtime, apiRouter)
controller.NewOAuthController(app.log, app.config, app.runtime, apiRouter, app.services.authService)
controller.NewOIDCController(app.log, app.services.oidcService, app.runtime, apiRouter, &app.router.RouterGroup)
controller.NewOIDCController(app.log, app.services.oidcService, app.runtime, apiRouter, &engine.RouterGroup)
controller.NewProxyController(app.log, app.runtime, apiRouter, app.services.accessControlService, app.services.authService, app.services.policyEngine)
controller.NewUserController(app.log, app.runtime, apiRouter, app.services.authService)
controller.NewResourcesController(app.config, &engine.RouterGroup)
+2 -2
View File
@@ -74,7 +74,7 @@ type AuthorizeScreenParams struct {
}
type AuthorizeCompleteRequest struct {
Ticket string `json:"oidc_ticket" binding:"required"`
Ticket string `json:"ticket" binding:"required"`
}
func NewOIDCController(
@@ -166,7 +166,7 @@ func (controller *OIDCController) authorize(c *gin.Context) {
ticket := controller.oidc.CreateAuthorizeRequestTicket(req)
queries, err := query.Values(AuthorizeScreenParams{
LoginFor: req.ClientID,
LoginFor: "oidc",
OIDCTicket: ticket,
OIDCScope: req.Scope,
OIDCName: client.Name,