You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dlab.apache.org by GitBox <gi...@apache.org> on 2019/10/07 09:48:34 UTC

[GitHub] [incubator-dlab] bhliva commented on a change in pull request #340: [DLAB-1156] Update user in mongo while refreshing access token

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@dlab.apache.org
For additional commands, e-mail: dev-help@dlab.apache.org