This commit is contained in:
Conrad Ludgate
2025-03-27 12:39:41 +01:00
committed by Conrad Ludgate
parent bdd68bb069
commit e8ccb4a4d1

View File

@@ -87,7 +87,12 @@ impl JwkCacheEntry {
self.key_sets
.values()
// make sure our requested role has access to the key set
.filter(|key_set| key_set.role_names.iter().any(|role| *role.as_str() == **role_name))
.filter(|key_set| {
key_set
.role_names
.iter()
.any(|role| *role.as_str() == **role_name)
})
// try and find the requested key-id in the key set
.find_map(|key_set| {
key_set