mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
[client] Remove duplicate audiences check (#5117)
This commit is contained in:
@@ -440,12 +440,8 @@ func (s *Server) ensureJWTValidator() error {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Use custom userIDClaim from authorizer if available
|
// Use custom userIDClaim from authorizer if available
|
||||||
audience := ""
|
|
||||||
if len(config.Audiences) != 0 {
|
|
||||||
audience = config.Audiences[0]
|
|
||||||
}
|
|
||||||
extractorOptions := []jwt.ClaimsExtractorOption{
|
extractorOptions := []jwt.ClaimsExtractorOption{
|
||||||
jwt.WithAudience(audience),
|
jwt.WithAudience(config.Audiences[0]),
|
||||||
}
|
}
|
||||||
if authorizer.GetUserIDClaim() != "" {
|
if authorizer.GetUserIDClaim() != "" {
|
||||||
extractorOptions = append(extractorOptions, jwt.WithUserIDClaim(authorizer.GetUserIDClaim()))
|
extractorOptions = append(extractorOptions, jwt.WithUserIDClaim(authorizer.GetUserIDClaim()))
|
||||||
|
|||||||
Reference in New Issue
Block a user