Timout form updates
parent
a9d1799eda
commit
cb6767dfb4
|
@ -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,6 +332,7 @@
|
|||
|
||||
events:{
|
||||
"click .btn-primary":"saveClient",
|
||||
"click #allowRefresh" : "toggleRefreshTokenTimeout",
|
||||
"click .btn-cancel": function() { window.history.back(); return false; },
|
||||
"change #requireClientSecret":"toggleRequireClientSecret",
|
||||
"change #displayClientSecret":"toggleDisplayClientSecret",
|
||||
|
@ -339,6 +340,10 @@
|
|||
"change #logoUrl input":"previewLogo"
|
||||
},
|
||||
|
||||
toggleRefreshTokenTimeout:function () {
|
||||
$("#refreshTokenValiditySeconds", this.$el).toggle();
|
||||
},
|
||||
|
||||
previewLogo:function(event) {
|
||||
if ($('#logoUrl input').val()) {
|
||||
//$('#logoBlock').show();
|
||||
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
|
@ -99,15 +99,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Refresh Tokens</label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="allowRefresh" <%=(allowRefresh == true ? 'checked' : '')%>> Allow refresh tokens?
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="scope">
|
||||
<label class="control-label">Scope</label>
|
||||
<div class="controls">
|
||||
|
@ -193,6 +184,15 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Refresh Tokens</label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="allowRefresh" <%=(allowRefresh == true ? 'checked' : '')%>> Allow refresh tokens?
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="refreshTokenValiditySeconds">
|
||||
<label class="control-label">Refresh Token
|
||||
Timeout</label>
|
||||
|
|
Loading…
Reference in New Issue