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,