File tree Expand file tree Collapse file tree
backend/src/main/kotlin/no/java/cupcake/plugins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,8 +71,12 @@ fun Application.configureAuth(oidcConfig: OidcConfig) {
7171
7272 @Suppress(" UNCHECKED_CAST" )
7373 val clientRoles =
74- (cred.payload.getClaim(" resource_access" )?.asMap()?.get(oidcConfig.expectedAzp) as ? Map <String , Any >)
75- ?.get(" roles" ) as ? List <* >
74+ (
75+ cred.payload
76+ .getClaim(" resource_access" )
77+ ?.asMap()
78+ ?.get(oidcConfig.expectedAzp) as ? Map <String , Any >
79+ )?.get(" roles" ) as ? List <* >
7680
7781 if (clientRoles?.contains(" pkom" ) == true ) JWTPrincipal (cred.payload) else null
7882 }
@@ -103,8 +107,12 @@ fun Application.configureUserInfoRoute(oidcConfig: OidcConfig) {
103107
104108 @Suppress(" UNCHECKED_CAST" )
105109 val clientRoles =
106- (p.payload.getClaim(" resource_access" )?.asMap()?.get(oidcConfig.expectedAzp) as ? Map <String , Any >)
107- ?.get(" roles" ) as ? List <* >
110+ (
111+ p.payload
112+ .getClaim(" resource_access" )
113+ ?.asMap()
114+ ?.get(oidcConfig.expectedAzp) as ? Map <String , Any >
115+ )?.get(" roles" ) as ? List <* >
108116
109117 call.respond(
110118 UserInfo (
You can’t perform that action at this time.
0 commit comments