File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
common/src/main/kotlin/com/cosmotech/common/utils Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ fun getCurrentAccountGroups(configuration: CsmPlatformProperties): List<String>
5959 return getValueFromAuthenticatedToken(configuration) {
6060 try {
6161 val jwt = JWTParser .parse(it)
62- jwt.jwtClaimsSet.getStringListClaim(configuration.authorization.groupJwtClaim)
62+ jwt.jwtClaimsSet.getStringListClaim(configuration.authorization.groupJwtClaim) ? : emptyList()
6363 } catch (e: ParseException ) {
6464 JSONObjectUtils .parse(it)[configuration.authorization.groupJwtClaim] as List <String >
6565 }
@@ -70,7 +70,7 @@ fun getCurrentAuthenticatedRoles(configuration: CsmPlatformProperties): List<Str
7070 return getValueFromAuthenticatedToken(configuration) {
7171 try {
7272 val jwt = JWTParser .parse(it)
73- jwt.jwtClaimsSet.getStringListClaim(configuration.authorization.rolesJwtClaim)
73+ jwt.jwtClaimsSet.getStringListClaim(configuration.authorization.rolesJwtClaim) ? : emptyList()
7474 } catch (e: ParseException ) {
7575 JSONObjectUtils .parse(it)[configuration.authorization.rolesJwtClaim] as List <String >
7676 }
You can’t perform that action at this time.
0 commit comments