Client scope now supported
parent
a1234a4fcd
commit
f7a0b8de32
|
@ -29,9 +29,6 @@
|
||||||
minlength:3,
|
minlength:3,
|
||||||
maxlength:200
|
maxlength:200
|
||||||
},
|
},
|
||||||
registeredRedirectUri: {
|
|
||||||
custom: 'validateURI'
|
|
||||||
},
|
|
||||||
accessTokenTimeout: {
|
accessTokenTimeout: {
|
||||||
required: true,
|
required: true,
|
||||||
type:"number"
|
type:"number"
|
||||||
|
@ -39,6 +36,9 @@
|
||||||
refreshTokenTimeout: {
|
refreshTokenTimeout: {
|
||||||
required: true,
|
required: true,
|
||||||
type:"number"
|
type:"number"
|
||||||
|
},
|
||||||
|
registeredRedirectUri: {
|
||||||
|
custom: 'validateURI'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
clientName:"",
|
clientName:"",
|
||||||
registeredRedirectUri:[""],
|
registeredRedirectUri:[""],
|
||||||
authorizedGrantTypes:[],
|
authorizedGrantTypes:[],
|
||||||
scope:[],
|
scope:[""],
|
||||||
authorities:[],
|
authorities:[],
|
||||||
clientDescription:"",
|
clientDescription:"",
|
||||||
clientId:null,
|
clientId:null,
|
||||||
|
@ -187,11 +187,12 @@
|
||||||
|
|
||||||
this.model.set({
|
this.model.set({
|
||||||
clientName:$('#clientName input').val(),
|
clientName:$('#clientName input').val(),
|
||||||
registeredRedirectUri:[$('#registeredRedirectUri input').val()],
|
registeredRedirectUri:$.trim($('#registeredRedirectUri textarea').val()).replace(/ /g,'').split("\n"),
|
||||||
clientDescription:$('#clientDescription textarea').val(),
|
clientDescription:$('#clientDescription textarea').val(),
|
||||||
allowRefresh:$('#allowRefresh').is(':checked'),
|
allowRefresh:$('#allowRefresh').is(':checked'),
|
||||||
accessTokenTimeout: $('#accessTokenTimeout input').val(),
|
accessTokenTimeout: $('#accessTokenTimeout input').val(),
|
||||||
refreshTokenTimeout: $('#refreshTokenTimeout input').val()
|
refreshTokenTimeout: $('#refreshTokenTimeout input').val(),
|
||||||
|
scope:$.map($('#scope textarea').val().replace(/,$/,'').replace(/\s/g,' ').split(","), $.trim)
|
||||||
});
|
});
|
||||||
|
|
||||||
this.model.save(this.model, {
|
this.model.save(this.model, {
|
||||||
|
|
|
@ -4,7 +4,13 @@
|
||||||
<%=clientName%>
|
<%=clientName%>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%=registeredRedirectUri[0]%>
|
<ul>
|
||||||
|
<% for (var i in registeredRedirectUri) { %>
|
||||||
|
<li>
|
||||||
|
<%=registeredRedirectUri[i]%>
|
||||||
|
</li>
|
||||||
|
<% } %>
|
||||||
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -52,7 +58,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Redirect URL</th>
|
<th>Redirect URI(s)</th>
|
||||||
<th>Grant Types</th>
|
<th>Grant Types</th>
|
||||||
<th>Scope</th>
|
<th>Scope</th>
|
||||||
<th>Authority</th>
|
<th>Authority</th>
|
||||||
|
@ -88,18 +94,19 @@
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
<span class="control-group" id="clientName">
|
<span class="control-group" id="clientName">
|
||||||
<label>Client name</label>
|
<label>Client name</label>
|
||||||
<input value="<%=clientName%>" type="text" class="" placeholder="Type something"> <span class="help-inline">Associated help text!</span>
|
<input value="<%=clientName%>" type="text" class="" placeholder="Type something"> <span class="help-inline">This must be more than three characters and can only be alpha-numeric </span>
|
||||||
</span>
|
</span>
|
||||||
<span class="control-group" id="registeredRedirectUri">
|
<span class="control-group" id="registeredRedirectUri">
|
||||||
<label>Redirect URL</label>
|
<label>Redirect URI(s)</label>
|
||||||
<input type="text" class="" value="<%=registeredRedirectUri[0]%>" placeholder="http://"><span class="help-inline">Associated help text!</span>
|
<textarea class="input-xlarge" placeholder="http://"
|
||||||
|
rows="3"><% for (var i in registeredRedirectUri) { %><%=registeredRedirectUri[i]+"\n"%><% } %></textarea> <span class="help-inline">You may enter multiple URLs separated by a new lines</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
<span class="control-group" id="clientDescription">
|
<span class="control-group" id="clientDescription">
|
||||||
<label>Description</label>
|
<label>Description</label>
|
||||||
<textarea class="input-xlarge" placeholder="Type a description"
|
<textarea class="input-xlarge" placeholder="Type a description"
|
||||||
rows="3"><%=clientDescription%></textarea> <span class="help-inline">Associated help text!</span>
|
rows="3"><%=clientDescription%></textarea> <span class="help-inline">This must be more than three characters and can only be alpha-numeric</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -198,12 +205,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="span12 control-group">
|
<div id="scope" class="span12 control-group">
|
||||||
<label for="textarea2">Scope</label>
|
<label for="textarea2">Scope</label>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<textarea rows="3" class="xlarge span10" placeholder="email,first name, last name"
|
<textarea rows="3" class="xlarge span10" placeholder="email,first name, last name"
|
||||||
id="textarea2" name="textarea2"></textarea>
|
id="textarea2" name="textarea2"><% for (var i in scope) { %><%=scope[i]+","%><% } %></textarea>
|
||||||
<span class="help-block">
|
<span class="help-block">
|
||||||
Please enter scopes separated by commas
|
Please enter scopes separated by commas
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue