Update pkg/oidc/token.go
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
parent
65491c6c35
commit
54a64af89b
1 changed files with 2 additions and 6 deletions
|
@ -447,14 +447,10 @@ func ClaimHash(claim string, sigAlgorithm jose.SignatureAlgorithm) (string, erro
|
||||||
}
|
}
|
||||||
|
|
||||||
func AppendClientIDToAudience(clientID string, audience []string) []string {
|
func AppendClientIDToAudience(clientID string, audience []string) []string {
|
||||||
exists := false
|
|
||||||
for _, aud := range audience {
|
for _, aud := range audience {
|
||||||
if aud == clientID {
|
if aud == clientID {
|
||||||
exists = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !exists {
|
|
||||||
audience = append(audience, clientID)
|
|
||||||
}
|
|
||||||
return audience
|
return audience
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return append(audience, clientID)
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue