@@ -1918,7 +1918,7 @@ public void ecrireGenApiServiceImpl2(String classeLangueNom) throws Exception {
19181918 if (StringUtils .equals (classeApiMethodeMethode , "GET" )) {
19191919 tl (5 , "{" );
19201920 } else {
1921- tl (5 , "if(authorizationDecisionResponse.failed()) {" );
1921+ tl (5 , "if(authorizationDecisionResponse.failed() || !scopes.contains( \" " , classeApiMethodeMethode , " \" ) ) {" );
19221922 tl (6 , "String msg = String.format(\" 403 FORBIDDEN user %s to %s %s\" , siteRequest.getUser().attributes().getJsonObject(\" accessToken\" ).getString(\" preferred_username\" ), serviceRequest.getExtra().getString(\" method\" ), serviceRequest.getExtra().getString(\" uri\" ));" );
19231923 tl (6 , "eventHandler.handle(Future.succeededFuture(" );
19241924 tl (7 , "new ServiceResponse(403, \" FORBIDDEN\" ," );
@@ -2130,7 +2130,7 @@ public void ecrireGenApiServiceImpl2(String classeLangueNom) throws Exception {
21302130 if (StringUtils .equals (classeApiMethodeMethode , "GET" )) {
21312131 tl (5 , "{" );
21322132 } else {
2133- tl (5 , "if(authorizationDecisionResponse.failed()) {" );
2133+ tl (5 , "if(authorizationDecisionResponse.failed() || !scopes.contains( \" " , classeApiMethodeMethode , " \" ) ) {" );
21342134 tl (6 , "String msg = String.format(\" 403 FORBIDDEN user %s to %s %s\" , siteRequest.getUser().attributes().getJsonObject(\" accessToken\" ).getString(\" preferred_username\" ), serviceRequest.getExtra().getString(\" method\" ), serviceRequest.getExtra().getString(\" uri\" ));" );
21352135 tl (6 , "eventHandler.handle(Future.succeededFuture(" );
21362136 tl (7 , "new ServiceResponse(403, \" FORBIDDEN\" ," );
0 commit comments