added dev page for self-service client registration
parent
6276ec8e66
commit
51973ea595
|
@ -13,3 +13,5 @@
|
||||||
<li><a href="manage/#user/approved">Manage Sites</a></li>
|
<li><a href="manage/#user/approved">Manage Sites</a></li>
|
||||||
<li><a href="manage/#user/tokens">Manage Active Tokens</a></li>
|
<li><a href="manage/#user/tokens">Manage Active Tokens</a></li>
|
||||||
<li><a href="manage/#user/profile">Manage Profiles</a></li>
|
<li><a href="manage/#user/profile">Manage Profiles</a></li>
|
||||||
|
<li class="nav-header">Developer</li>
|
||||||
|
<li><a href="manage/#dev/dynreg">Self-service client registration</a><li>
|
|
@ -26,6 +26,7 @@
|
||||||
<script type="text/javascript" src="resources/js/grant.js"></script>
|
<script type="text/javascript" src="resources/js/grant.js"></script>
|
||||||
<script type="text/javascript" src="resources/js/scope.js"></script>
|
<script type="text/javascript" src="resources/js/scope.js"></script>
|
||||||
<script type="text/javascript" src="resources/js/whitelist.js"></script>
|
<script type="text/javascript" src="resources/js/whitelist.js"></script>
|
||||||
|
<script type="text/javascript" src="resources/js/dynreg.js"></script>
|
||||||
<script type="text/javascript" src="resources/js/admin.js"></script>
|
<script type="text/javascript" src="resources/js/admin.js"></script>
|
||||||
</c:if>
|
</c:if>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -331,6 +331,8 @@ var AppRouter = Backbone.Router.extend({
|
||||||
"user/tokens":"notImplemented",
|
"user/tokens":"notImplemented",
|
||||||
"user/profile":"notImplemented",
|
"user/profile":"notImplemented",
|
||||||
|
|
||||||
|
"dev/dynreg":"dynReg",
|
||||||
|
|
||||||
"": "root"
|
"": "root"
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -634,6 +636,16 @@ var AppRouter = Backbone.Router.extend({
|
||||||
$('#content').html(this.systemScopeFormView.render().el);
|
$('#content').html(this.systemScopeFormView.render().el);
|
||||||
setPageTitle("Edit System Scope");
|
setPageTitle("Edit System Scope");
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
dynReg:function() {
|
||||||
|
this.breadCrumbView.collection.reset();
|
||||||
|
this.breadCrumbView.collection.add([
|
||||||
|
{text:"Home", href:""},
|
||||||
|
{text:"Client Registration", href:"manage/#dev/dynreg"}
|
||||||
|
]);
|
||||||
|
$('#content').html($('#tmpl-dynreg').html());
|
||||||
|
setPageTitle("Self-service Client Registration");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -658,6 +670,7 @@ $(function () {
|
||||||
$.get('resources/template/grant.html', _load);
|
$.get('resources/template/grant.html', _load);
|
||||||
$.get('resources/template/scope.html', _load);
|
$.get('resources/template/scope.html', _load);
|
||||||
$.get('resources/template/whitelist.html', _load);
|
$.get('resources/template/whitelist.html', _load);
|
||||||
|
$.get('resources/template/dynreg.html', _load);
|
||||||
|
|
||||||
jQuery.ajaxSetup({async:true});
|
jQuery.ajaxSetup({async:true});
|
||||||
app = new AppRouter();
|
app = new AppRouter();
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
<!--
|
||||||
|
Copyright 2013 The MITRE Corporation
|
||||||
|
and the MIT Kerberos and Internet Trust Consortium
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<!-- self-service dynamic registration -->
|
||||||
|
|
||||||
|
<script type="text/html" id="tmpl-dynreg">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<button class="btn" id="newreg">Register a new client</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong> - OR - </strong>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="text" id="clientId" placeholder="Enter Client ID">
|
||||||
|
<input type="text" id="regtoken" placeholder="Enter Registration Access Token">
|
||||||
|
<button class="btn" id="editreg">Edit an existing client</button>
|
||||||
|
<span class="help-block>Paste in your client ID and registration access token to access the client.</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</script>
|
Loading…
Reference in New Issue