Updated timeout functions
parent
6fdd088125
commit
ebf77bea68
|
@ -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")
|
||||
});
|
||||
|
||||
|
|
|
@ -168,13 +168,15 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group" id="accessTokenValiditySeconds">
|
||||
<label class="control-label">Access Token
|
||||
Timeout</label>
|
||||
<label class="control-label">Access Token Timeout</label>
|
||||
<div class="controls">
|
||||
<div>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="disableAccessTokenTimeout" <%=(accessTokenValiditySeconds == null ? 'checked' : '')%>/> Access tokens do not time out
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-append">
|
||||
<input type="text" class="" value="<%=(accessTokenValiditySeconds == null ? '' : accessTokenValiditySeconds)%>" id="access-token-timeout-seconds" size="16"><span
|
||||
class="add-on">seconds</span>
|
||||
<input type="checkbox" id="disableAccessTokenTimeout" <%=(accessTokenValiditySeconds == null ? 'checked' : '')%>/> disable timeout
|
||||
<input type="text" class="" value="<%=(accessTokenValiditySeconds == null ? '' : accessTokenValiditySeconds)%>" id="access-token-timeout-seconds" size="16"><span class="add-on">seconds</span>
|
||||
</div>
|
||||
<p class="help-block">Enter this time in seconds.</p>
|
||||
</div>
|
||||
|
@ -182,13 +184,16 @@
|
|||
|
||||
|
||||
<div class="control-group" id="idTokenValiditySeconds">
|
||||
<label class="control-label">ID Token
|
||||
Timeout</label>
|
||||
<label class="control-label">ID Token Timeout</label>
|
||||
<div class="controls">
|
||||
<div>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="disableIDTokenTimeout" <%=(idTokenValiditySeconds == null ? 'checked' : '')%>/> ID Tokens do not time out
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-append">
|
||||
<input type="text" class="" value="<%=(idTokenValiditySeconds == null ? '' : idTokenValiditySeconds)%>" id="id-token-timeout-seconds" size="16"><span
|
||||
class="add-on">seconds</span>
|
||||
<input type="checkbox" id="disableIDTokenTimeout" <%=(idTokenValiditySeconds == null ? 'checked' : '')%>/> disable timeout
|
||||
</div>
|
||||
<p class="help-block">Enter this time in seconds.</p>
|
||||
</div>
|
||||
|
@ -198,19 +203,20 @@
|
|||
<label class="control-label">Refresh Tokens</label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="allowRefresh" <%=(allowRefresh == true ? 'checked' : '')%>> Allow refresh tokens?
|
||||
<input type="checkbox" id="allowRefresh" <%=(allowRefresh == true ? 'checked' : '')%>> Refresh tokens are issued for this client
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="refreshTokenValiditySeconds">
|
||||
<label class="control-label">Refresh Token
|
||||
Timeout</label>
|
||||
<div class="controls">
|
||||
<div>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="disableRefreshTokenTimeout" <%=(refreshTokenValiditySeconds == null ? 'checked' : '')%>/> Refresh tokens do not time out
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-append">
|
||||
<input type="text" class="" value="<%=(refreshTokenValiditySeconds == null ? '' : refreshTokenValiditySeconds)%>" id="refresh-token-timeout-seconds" size="16"><span
|
||||
class="add-on">seconds</span>
|
||||
<input type="checkbox" id="disableRefreshTokenTimeout" <%=(refreshTokenValiditySeconds == null ? 'checked' : '')%>/> disable timeout
|
||||
<input type="text" class="" value="<%=(refreshTokenValiditySeconds == null ? '' : refreshTokenValiditySeconds)%>" id="refresh-token-timeout-seconds" size="16"><span class="add-on">seconds</span>
|
||||
</div>
|
||||
<p class="help-block">Enter this time in seconds.</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue