added controls for client secret processing
parent
a02f37cec3
commit
9e60da2675
|
@ -70,7 +70,10 @@
|
||||||
clientId:"",
|
clientId:"",
|
||||||
allowRefresh:false,
|
allowRefresh:false,
|
||||||
accessTokenValiditySeconds: 0,
|
accessTokenValiditySeconds: 0,
|
||||||
refreshTokenValiditySeconds: 0
|
refreshTokenValiditySeconds: 0,
|
||||||
|
displayClientSecret: false,
|
||||||
|
generateClientSecret: false,
|
||||||
|
requireClientSecret: true
|
||||||
},
|
},
|
||||||
|
|
||||||
urlRoot:"api/clients"
|
urlRoot:"api/clients"
|
||||||
|
@ -205,10 +208,20 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var requireClientSecret = $('#requireClientSecret').is(':checked');
|
||||||
|
var generateClientSecret = $('#generateClientSecret').is(':checked');
|
||||||
|
var clientSecret = null;
|
||||||
|
|
||||||
|
if (requireClientSecret && !generateClientSecret) {
|
||||||
|
// if it's required but we're not generating it, send the value
|
||||||
|
clientSecret = $('#clientSecret input').val();
|
||||||
|
}
|
||||||
|
|
||||||
var valid = this.model.set({
|
var valid = this.model.set({
|
||||||
applicationName:$('#applicationName input').val(),
|
applicationName:$('#applicationName input').val(),
|
||||||
clientId:$('#clientId input').val(),
|
clientId:$('#clientId input').val(),
|
||||||
clientSecret:$('#clientSecret input').val(),
|
clientSecret: clientSecret,
|
||||||
|
generateClientSecret:generateClientSecret,
|
||||||
registeredRedirectUri:registeredRedirectUri,
|
registeredRedirectUri:registeredRedirectUri,
|
||||||
clientDescription:$('#clientDescription textarea').val(),
|
clientDescription:$('#clientDescription textarea').val(),
|
||||||
allowRefresh:$('#allowRefresh').is(':checked'),
|
allowRefresh:$('#allowRefresh').is(':checked'),
|
||||||
|
|
|
@ -97,6 +97,34 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Require Client Secret</label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" id="requireClientSecret" <%=(requireClientSecret == true ? 'checked' : '')%>> Require client secret?
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Generate Client Secret</label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" id="generateClientSecret" <%=(generateClientSecret == true ? 'checked' : '')%>> Generate a new client secret?
|
||||||
|
</label>
|
||||||
|
<p class="help-block">New secret will be generated when you click 'Save'</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Show Client Secret</label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" id="displayClientSecret" <%=(displayClientSecret == true ? 'checked' : '')%>> Display client secret here:
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="control-group" id="clientSecret">
|
<div class="control-group" id="clientSecret">
|
||||||
<label class="control-label">Client Secret</label>
|
<label class="control-label">Client Secret</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
|
Loading…
Reference in New Issue