fix: supported ui locales from config (#107)

This commit is contained in:
Livio Amstutz 2021-07-09 09:20:03 +02:00 committed by GitHub
parent 1392c0ee9a
commit 8a35b89815
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 10 deletions

View file

@ -9,6 +9,7 @@ import (
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
"github.com/gorilla/schema"
"golang.org/x/text/language"
"gopkg.in/square/go-jose.v2"
"github.com/caos/oidc/pkg/oidc"
@ -85,6 +86,7 @@ type Config struct {
CodeMethodS256 bool
AuthMethodPrivateKeyJWT bool
GrantTypeRefreshToken bool
SupportedUILocales []language.Tag
}
type endpoints struct {
@ -202,6 +204,10 @@ func (o *openidProvider) GrantTypeJWTAuthorizationSupported() bool {
return true
}
func (o *openidProvider) SupportedUILocales() []language.Tag {
return o.config.SupportedUILocales
}
func (o *openidProvider) Storage() Storage {
return o.storage
}