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 bc52e2b66..9b80dac62 100644 --- a/openid-connect-server/src/main/webapp/resources/js/app.js +++ b/openid-connect-server/src/main/webapp/resources/js/app.js @@ -160,7 +160,7 @@ // We can pass it default values. defaults:{ id:null, - idTokenValiditySeconds: 0, + idTokenValiditySeconds: 600, applicationName:"", clientSecret:"", registeredRedirectUri:[], @@ -171,8 +171,8 @@ logoUrl:"", clientId:"", allowRefresh:false, - accessTokenValiditySeconds: 0, - refreshTokenValiditySeconds: 0, + accessTokenValiditySeconds: 3600, + refreshTokenValiditySeconds: 604800, displayClientSecret: false, generateClientSecret: false, requireClientSecret: true @@ -332,12 +332,17 @@ events:{ "click .btn-primary":"saveClient", + "click #allowRefresh" : "toggleRefreshTokenTimeout", "click .btn-cancel": function() { window.history.back(); return false; }, "change #requireClientSecret":"toggleRequireClientSecret", "change #displayClientSecret":"toggleDisplayClientSecret", "change #generateClientSecret":"toggleGenerateClientSecret", "change #logoUrl input":"previewLogo" }, + + toggleRefreshTokenTimeout:function () { + $("#refreshTokenValiditySeconds", this.$el).toggle(); + }, previewLogo:function(event) { if ($('#logoUrl input').val()) { @@ -483,6 +488,10 @@ , autocomplete: _.uniq(_.flatten(app.clientList.pluck("scope"))) , collection: this.scopeCollection}).render().el); + if (!this.model.get("allowRefresh")) { + $("#refreshTokenValiditySeconds", this.$el).hide(); + } + return this; }, 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 3893442f9..345bc7f32 100644 --- a/openid-connect-server/src/main/webapp/resources/template/client.html +++ b/openid-connect-server/src/main/webapp/resources/template/client.html @@ -99,15 +99,6 @@ -
- -
- -
-
-
@@ -193,6 +184,15 @@
+
+ +
+ +
+
+