diff --git a/openid-connect-server/src/main/webapp/resources/js/app.js b/openid-connect-server/src/main/webapp/resources/js/app.js index 8ccee8a8f..7aee22009 100644 --- a/openid-connect-server/src/main/webapp/resources/js/app.js +++ b/openid-connect-server/src/main/webapp/resources/js/app.js @@ -429,6 +429,21 @@ clientSecret = $('#clientSecret').val(); } + var accessTokenValiditySeconds = null; + if (!$('disableAccessTokenTimeout').is(':checked')) { + accessTokenValiditySeconds = this.getFormTokenValue($('#accessTokenValiditySeconds input[type=text]').val()); + } + + var idTokenValiditySeconds = null; + if (!$('disableIDTokenTimeout').is(':checked')) { + idTokenValiditySeconds = this.getFormTokenValue($('#idTokenValiditySeconds input[type=text]').val()); + } + + var refreshTokenValiditySeconds = null; + if ($('#allowRefresh').is(':checked') && !$('disableRefreshTokenTimeout').is(':checked')) { + refreshTokenValiditySeconds = this.getFormTokenValue($('#refreshTokenValiditySeconds input[type=text]').val()); + } + var valid = this.model.set({ applicationName:$('#applicationName input').val(), clientId:$('#clientId input').val(), @@ -439,9 +454,9 @@ logoUrl:$('#logoUrl input').val(), allowRefresh:$('#allowRefresh').is(':checked'), authorizedGrantTypes: authorizedGrantTypes, - accessTokenValiditySeconds: this.getFormTokenValue($('#accessTokenValiditySeconds input').val()), - refreshTokenValiditySeconds: this.getFormTokenValue($('#refreshTokenValiditySeconds input').val()), - idTokenValiditySeconds: this.getFormTokenValue($('#idTokenValiditySeconds input').val()), + accessTokenValiditySeconds: accessTokenValiditySeconds, + refreshTokenValiditySeconds: refreshTokenValiditySeconds, + idTokenValiditySeconds: idTokenValiditySeconds, scope: this.scopeCollection.pluck("item") }); diff --git a/openid-connect-server/src/main/webapp/resources/template/client.html b/openid-connect-server/src/main/webapp/resources/template/client.html index bece1d3f3..d8d559c10 100644 --- a/openid-connect-server/src/main/webapp/resources/template/client.html +++ b/openid-connect-server/src/main/webapp/resources/template/client.html @@ -168,13 +168,15 @@
- +
+
+ +
- seconds - /> disable timeout + seconds

Enter this time in seconds.

@@ -182,13 +184,16 @@
- +
+
+ +
seconds - /> disable timeout

Enter this time in seconds.

@@ -198,19 +203,20 @@
-
+
+ +
- seconds - /> disable timeout + seconds

Enter this time in seconds.