diff --git a/iam-login-service/src/main/java/it/infn/mw/iam/core/web/util/IamViewInfoInterceptor.java b/iam-login-service/src/main/java/it/infn/mw/iam/core/web/util/IamViewInfoInterceptor.java index 5a7cdc865..06d4e458c 100644 --- a/iam-login-service/src/main/java/it/infn/mw/iam/core/web/util/IamViewInfoInterceptor.java +++ b/iam-login-service/src/main/java/it/infn/mw/iam/core/web/util/IamViewInfoInterceptor.java @@ -42,6 +42,7 @@ public class IamViewInfoInterceptor implements HandlerInterceptor { public static final String RCAUTH_ENABLED_KEY = "iamRcauthEnabled"; public static final String RESOURCES_PATH_KEY = "resourcesPrefix"; public static final String CLIENT_DEFAULTS_PROPERTIES_KEY = "clientDefaultsProperties"; + public static final String CLIENT_TRACK_LAST_USED_KEY = "clientTrackLastUsed"; @Value("${iam.version}") String iamVersion; @@ -83,6 +84,8 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons request.setAttribute(RCAUTH_ENABLED_KEY, rcAuthProperties.isEnabled()); request.setAttribute(CLIENT_DEFAULTS_PROPERTIES_KEY, clientRegistrationProperties.getClientDefaults()); + + request.setAttribute(CLIENT_TRACK_LAST_USED_KEY, iamProperties.getClient().isTrackLastUsed()); if (iamProperties.getVersionedStaticResources().isEnableVersioning()) { request.setAttribute(RESOURCES_PATH_KEY, String.format("/resources/%s", gitCommitId)); diff --git a/iam-login-service/src/main/webapp/WEB-INF/tags/iamHeader.tag b/iam-login-service/src/main/webapp/WEB-INF/tags/iamHeader.tag index e62cadd8f..61b29fce3 100644 --- a/iam-login-service/src/main/webapp/WEB-INF/tags/iamHeader.tag +++ b/iam-login-service/src/main/webapp/WEB-INF/tags/iamHeader.tag @@ -111,4 +111,8 @@ function getAccessTokenValiditySeconds() { function getRefreshTokenValiditySeconds() { return ${clientDefaultsProperties.defaultRefreshTokenValiditySeconds}; } + +function getClientTrackLastUsed() { + return ${clientTrackLastUsed}; +} diff --git a/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/clients/clientslist/clientslist.component.html b/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/clients/clientslist/clientslist.component.html index ea5165cec..83cdb6218 100644 --- a/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/clients/clientslist/clientslist.component.html +++ b/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/clients/clientslist/clientslist.component.html @@ -77,7 +77,7 @@ Client name & id Created Dyn. registered - Last Used + Last Used Information Actions @@ -106,13 +106,13 @@ {{ c.dynamically_registered }} - +
{{c.last_used | date }}
- Never + N/A
diff --git a/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/clients/clientslist/clientslist.component.js b/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/clients/clientslist/clientslist.component.js index 58cc337dd..bf893ccb2 100644 --- a/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/clients/clientslist/clientslist.component.js +++ b/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/clients/clientslist/clientslist.component.js @@ -26,6 +26,7 @@ self.resetFilter = resetFilter; self.onChangePage = onChangePage; self.deleteClient = deleteClient; + self.clientTrackLastUsed = getClientTrackLastUsed(); self.$onInit = function () { console.debug('ClientsListController.self', self);