chore: move CAOS_OIDC_DEV to const (and ensure TestValidateIssuer runs (even on machines with env set))
This commit is contained in:
parent
b311610d06
commit
d6203fb0d5
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue