From 9713c7d1ceed36b892a75578a677292c936cd89b Mon Sep 17 00:00:00 2001 From: YuriyZ Date: Thu, 17 Nov 2022 22:07:08 +0200 Subject: [PATCH] feat(jans-auth-server): updated mau on refreshing access token #2955 --- .../jans/as/server/token/ws/rs/TokenRestWebServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jans-auth-server/server/src/main/java/io/jans/as/server/token/ws/rs/TokenRestWebServiceImpl.java b/jans-auth-server/server/src/main/java/io/jans/as/server/token/ws/rs/TokenRestWebServiceImpl.java index 2492860fe6e..44ad15c5d7a 100644 --- a/jans-auth-server/server/src/main/java/io/jans/as/server/token/ws/rs/TokenRestWebServiceImpl.java +++ b/jans-auth-server/server/src/main/java/io/jans/as/server/token/ws/rs/TokenRestWebServiceImpl.java @@ -40,6 +40,7 @@ import io.jans.as.server.service.external.ExternalUpdateTokenService; import io.jans.as.server.service.external.context.ExternalResourceOwnerPasswordCredentialsContext; import io.jans.as.server.service.external.context.ExternalUpdateTokenContext; +import io.jans.as.server.service.stat.StatService; import io.jans.as.server.uma.service.UmaTokenService; import io.jans.as.server.util.ServerUtil; import io.jans.orm.exception.AuthenticationException; @@ -140,6 +141,9 @@ public class TokenRestWebServiceImpl implements TokenRestWebService { @Inject private TokenCreatorService tokenCreatorService; + @Inject + private StatService statService; + @Override public Response requestAccessToken(String grantType, String code, String redirectUri, String username, String password, String scope, @@ -368,6 +372,7 @@ private Response processRefreshTokenGrant(String scope, String refreshToken, Fun tokenExchangeService.rotateDeviceSecretOnRefreshToken(executionContext.getHttpRequest(), authorizationGrant, scope); + statService.reportActiveUser(authorizationGrant.getUserId()); auditLog.updateOAuth2AuditLog(authorizationGrant, true); return response(Response.ok().entity(getJSonResponse(accToken,