fix: supported ui locales from config

This commit is contained in:
Livio Amstutz 2021-07-09 09:10:39 +02:00
parent 1392c0ee9a
commit 0a08d6842d
4 changed files with 26 additions and 10 deletions

View file

@ -3,8 +3,6 @@ package op
import (
"net/http"
"golang.org/x/text/language"
"github.com/caos/oidc/pkg/oidc"
"github.com/caos/oidc/pkg/utils"
)
@ -37,7 +35,7 @@ func CreateDiscoveryConfig(c Configuration, s Signer) *oidc.DiscoveryConfigurati
IntrospectionEndpointAuthMethodsSupported: AuthMethodsIntrospectionEndpoint(c),
ClaimsSupported: SupportedClaims(c),
CodeChallengeMethodsSupported: CodeChallengeMethods(c),
UILocalesSupported: UILocales(c),
UILocalesSupported: c.SupportedUILocales(),
}
}
@ -146,10 +144,3 @@ func CodeChallengeMethods(c Configuration) []oidc.CodeChallengeMethod {
}
return codeMethods
}
func UILocales(c Configuration) []language.Tag {
return []language.Tag{
language.English,
language.German,
}
}