Skip to content

Commit

Permalink
chore(jans-cedarling): improve code readability
Browse files Browse the repository at this point in the history
Signed-off-by: rmarinn <[email protected]>
  • Loading branch information
rmarinn committed Jan 8, 2025
1 parent 1cd49b9 commit 6e99c1c
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ impl EntityBuilder {
}
}

for token in [
let token_refs = vec![
tokens.userinfo.as_ref(),
tokens.id.as_ref(),
tokens.access.as_ref(),
]
.into_iter()
.flatten()
{
];
for token in token_refs.into_iter().flatten() {
let role_claim = token.role_mapping();
if let Some(claim) = token.get_claim(role_claim).as_ref() {
match claim.value() {
Expand Down

0 comments on commit 6e99c1c

Please sign in to comment.