diff --git a/mokey.yaml.sample b/mokey.yaml.sample index 35c2faa..7e433e6 100644 --- a/mokey.yaml.sample +++ b/mokey.yaml.sample @@ -214,6 +214,7 @@ develop: false # Hydra config #------------------------------------------------------------------------------ # hydra_admin_url: "https://localhost:4445" +# hydra_consent_skip: false # hydra_consent_timeout: 86400 # hydra_login_timeout: 86400 # hydra_fake_tls_termination: true diff --git a/server/hydra.go b/server/hydra.go index 79943b4..b0ec0f0 100644 --- a/server/hydra.go +++ b/server/hydra.go @@ -60,7 +60,7 @@ func (h *Handler) ConsentGet(c echo.Context) error { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to validate consent") } - if consent.Skip { + if viper.GetBool("hydra_consent_skip") || consent.Skip { log.WithFields(log.Fields{ "user": consent.Subject, }).Info("Hydra requested we skip consent") diff --git a/server/server.go b/server/server.go index 30f74bf..002d574 100644 --- a/server/server.go +++ b/server/server.go @@ -36,6 +36,7 @@ func init() { viper.SetDefault("redis", ":6379") viper.SetDefault("max_requests", 15) viper.SetDefault("rate_limit_expire", 3600) + viper.SetDefault("hydra_consent_skip", false) viper.SetDefault("hydra_login_timeout", 86400) viper.SetDefault("hydra_consent_timeout", 86400) }