From 56de61974ae0d2a3d8382191c2aae479a062e9b2 Mon Sep 17 00:00:00 2001 From: YuriyZ Date: Thu, 17 Nov 2022 22:14:55 +0200 Subject: [PATCH] feat(jans-auth-server): updated mau on refreshing access token #2955 (#3025) --- .../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,