mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ext_jwt: streamline expected aud in access tokens and id tokens (#87401)
This commit is contained in:
@@ -26,17 +26,15 @@ type AuthJWTSettings struct {
|
||||
}
|
||||
|
||||
type ExtJWTSettings struct {
|
||||
Enabled bool
|
||||
ExpectIssuer string
|
||||
ExpectAudience string
|
||||
JWKSUrl string
|
||||
Enabled bool
|
||||
ExpectIssuer string
|
||||
JWKSUrl string
|
||||
}
|
||||
|
||||
func (cfg *Cfg) readAuthExtJWTSettings() {
|
||||
authExtendedJWT := cfg.SectionWithEnvOverrides("auth.extended_jwt")
|
||||
jwtSettings := ExtJWTSettings{}
|
||||
jwtSettings.Enabled = authExtendedJWT.Key("enabled").MustBool(false)
|
||||
jwtSettings.ExpectAudience = authExtendedJWT.Key("expect_audience").MustString("")
|
||||
jwtSettings.JWKSUrl = authExtendedJWT.Key("jwks_url").MustString("")
|
||||
cfg.ExtJWTAuth = jwtSettings
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user