|
|
@ -686,9 +686,27 @@ var ClientFormView = Backbone.View.extend({
|
|
|
|
var generateClientSecret = $('#generateClientSecret input').is(':checked');
|
|
|
|
var generateClientSecret = $('#generateClientSecret input').is(':checked');
|
|
|
|
var clientSecret = null;
|
|
|
|
var clientSecret = null;
|
|
|
|
|
|
|
|
|
|
|
|
if (!generateClientSecret) {
|
|
|
|
var tokenEndpointAuthMethod = $('#tokenEndpointAuthMethod input').filter(':checked').val();
|
|
|
|
// if it's required but we're not generating it, send the value to preserve it
|
|
|
|
|
|
|
|
clientSecret = $('#clientSecret input').val();
|
|
|
|
// whether or not the client secret changed
|
|
|
|
|
|
|
|
var secretChanged = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (tokenEndpointAuthMethod == 'SECRET_BASIC'
|
|
|
|
|
|
|
|
|| tokenEndpointAuthMethod == 'SECRET_POST'
|
|
|
|
|
|
|
|
|| tokenEndpointAuthMethod == 'SECRET_JWT') {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!generateClientSecret) {
|
|
|
|
|
|
|
|
// if it's required but we're not generating it, send the value to preserve it
|
|
|
|
|
|
|
|
clientSecret = $('#clientSecret input').val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if it's not the same as before, offer to display it
|
|
|
|
|
|
|
|
if (clientSecret != this.model.get('clientSecret')) {
|
|
|
|
|
|
|
|
secretChanged = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// it's being generated anew
|
|
|
|
|
|
|
|
secretChanged = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var accessTokenValiditySeconds = null;
|
|
|
|
var accessTokenValiditySeconds = null;
|
|
|
@ -729,15 +747,13 @@ var ClientFormView = Backbone.View.extend({
|
|
|
|
allowRefresh: $('#allowRefresh').is(':checked'),
|
|
|
|
allowRefresh: $('#allowRefresh').is(':checked'),
|
|
|
|
allowIntrospection: $('#allowIntrospection input').is(':checked'), // <-- And here? --^
|
|
|
|
allowIntrospection: $('#allowIntrospection input').is(':checked'), // <-- And here? --^
|
|
|
|
scope: scopes,
|
|
|
|
scope: scopes,
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: items below this line are untested
|
|
|
|
|
|
|
|
tosUri: $('#tosUri input').val(),
|
|
|
|
tosUri: $('#tosUri input').val(),
|
|
|
|
policyUri: $('#policyUri input').val(),
|
|
|
|
policyUri: $('#policyUri input').val(),
|
|
|
|
clientUri: $('#clientUri input').val(),
|
|
|
|
clientUri: $('#clientUri input').val(),
|
|
|
|
applicationType: $('#applicationType input').filter(':checked').val(),
|
|
|
|
applicationType: $('#applicationType input').filter(':checked').val(),
|
|
|
|
jwksUri: $('#jwksUri input').val(),
|
|
|
|
jwksUri: $('#jwksUri input').val(),
|
|
|
|
subjectType: $('#subjectType input').filter(':checked').val(),
|
|
|
|
subjectType: $('#subjectType input').filter(':checked').val(),
|
|
|
|
tokenEndpointAuthMethod: $('#tokenEndpointAuthMethod input').filter(':checked').val(),
|
|
|
|
tokenEndpointAuthMethod: tokenEndpointAuthMethod,
|
|
|
|
responseTypes: responseTypes,
|
|
|
|
responseTypes: responseTypes,
|
|
|
|
sectorIdentifierUri: $('#sectorIdentifierUri input').val(),
|
|
|
|
sectorIdentifierUri: $('#sectorIdentifierUri input').val(),
|
|
|
|
initiateLoginUri: $('#initiateLoginUri input').val(),
|
|
|
|
initiateLoginUri: $('#initiateLoginUri input').val(),
|
|
|
@ -784,7 +800,13 @@ var ClientFormView = Backbone.View.extend({
|
|
|
|
|
|
|
|
|
|
|
|
$('#modalAlertLabel').html('Client Saved');
|
|
|
|
$('#modalAlertLabel').html('Client Saved');
|
|
|
|
|
|
|
|
|
|
|
|
$('#modalAlert .modal-body').html(_self.clientSavedTemplate(_self.model.toJSON()));
|
|
|
|
var savedModel = {
|
|
|
|
|
|
|
|
clientId: _self.model.get('clientId'),
|
|
|
|
|
|
|
|
clientSecret: _self.model.get('clientSecret'),
|
|
|
|
|
|
|
|
secretChanged: secretChanged
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#modalAlert .modal-body').html(_self.clientSavedTemplate(savedModel));
|
|
|
|
|
|
|
|
|
|
|
|
$('#modalAlert .modal-body #savedClientSecret').hide();
|
|
|
|
$('#modalAlert .modal-body #savedClientSecret').hide();
|
|
|
|
|
|
|
|
|
|
|
|