mirror of
https://github.com/distribution/distribution.git
synced 2025-09-08 18:29:52 +00:00
feat: accept lists in the token audience claim
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
@@ -56,3 +56,14 @@ func contains(ss []string, q string) bool {
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// containsAny returns true if any of q is found in ss.
|
||||
func containsAny(ss []string, q []string) bool {
|
||||
for _, s := range ss {
|
||||
if contains(q, s) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user