Update pkg/oidc/token.go

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi 2020-11-16 07:58:28 +01:00 committed by GitHub
parent 65491c6c35
commit 54a64af89b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -447,14 +447,10 @@ func ClaimHash(claim string, sigAlgorithm jose.SignatureAlgorithm) (string, erro
}
func AppendClientIDToAudience(clientID string, audience []string) []string {
exists := false
for _, aud := range audience {
if aud == clientID {
exists = true
}
}
if !exists {
audience = append(audience, clientID)
}
return audience
}
}
return append(audience, clientID)
}