bhliva commented on a change in pull request #340: [DLAB-1156] Update user in 
mongo while refreshing access token
URL: https://github.com/apache/incubator-dlab/pull/340#discussion_r331931367
 
 

 ##########
 File path: 
services/self-service/src/main/java/com/epam/dlab/backendapi/resources/KeycloakResource.java
 ##########
 @@ -93,6 +94,8 @@ public Response 
refreshAccessToken(@PathParam("refresh_token") String refreshTok
                AccessTokenResponse tokenResponse;
                try {
                        tokenResponse = 
keycloakService.refreshToken(refreshToken);
+                       final String username = 
KeycloakUtil.parseToken(tokenResponse.getToken()).getPreferredUsername();
+                       securityDAO.updateUser(username, tokenResponse);
 
 Review comment:
   Pls move implementation in service layer

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to