File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/main/java/fr/insee/genesis/configuration/auth/security Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,10 @@ public Collection<GrantedAuthority> convert(Jwt source) {
8585 String [] claimPath = inseeSecurityTokenProperties .getOidcClaimRole ().split ("\\ ." );
8686 Map <String , Object > claims = source .getClaims ();
8787 try {
88- if (!claims .isEmpty ()) {
89- for (int i = 0 ; i < claimPath .length - 1 ; i ++) {
90- claims = (Map <String , Object >) claims .get (claimPath [i ]);
91- }
92-
88+ for (int i = 0 ; i < claimPath .length - 1 ; i ++) {
89+ claims = (Map <String , Object >) claims .get (claimPath [i ]);
90+ }
91+ if (claims != null ) {
9392 List <String > tokenClaims = (List <String >) claims .getOrDefault (claimPath [claimPath .length - 1 ], List .of ());
9493 // Collect distinct values from mapping associated with input keys
9594 List <String > claimedRoles = tokenClaims .stream ()
You can’t perform that action at this time.
0 commit comments