allow skipping userinfo call

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2023-08-23 13:56:48 +02:00
parent e49b2c159b
commit 5422586bfa
9 changed files with 167 additions and 37 deletions
@@ -50,6 +50,12 @@ func Validate(cfg *config.Config) error {
config.AccessTokenVerificationJWT, config.AccessTokenVerificationNone,
)
}
if cfg.OIDC.AccessTokenVerifyMethod == "none" && cfg.OIDC.SkipUserInfo {
return fmt.Errorf(
"Incompatible value '%t' for 'skip_user_info' in service %s. Must be false when 'access_token_verify_method' is 'none'.",
cfg.OIDC.SkipUserInfo, cfg.Service.Name,
)
}
return nil
}