chore: move CAOS_OIDC_DEV to const (and ensure TestValidateIssuer runs (even on machines with env set))

This commit is contained in:
Livio Amstutz 2020-10-07 08:49:23 +02:00
parent b311610d06
commit d6203fb0d5
2 changed files with 6 additions and 2 deletions

View file

@ -7,6 +7,8 @@ import (
"strings"
)
const OidcDevMode = "CAOS_OIDC_DEV"
type Configuration interface {
Issuer() string
AuthorizationEndpoint() Endpoint
@ -42,7 +44,7 @@ func ValidateIssuer(issuer string) error {
}
func devLocalAllowed(url *url.URL) bool {
_, b := os.LookupEnv("CAOS_OIDC_DEV")
_, b := os.LookupEnv(OidcDevMode)
if !b {
return b
}