added warnings for empty scopes and empty redirect URI lists
parent
db052f11ca
commit
793740cf08
|
@ -51,11 +51,19 @@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<% if (client.redirectUris) { %>
|
<% if (_.isEmpty(client.redirectUris)) {
|
||||||
|
if (_.contains(client.grantTypes, 'authorization_code') ||
|
||||||
|
_.contains(client.grantTypes, 'implicit')) {
|
||||||
|
%>
|
||||||
|
<div><span class="badge badge-important"><i class="icon-warning-sign icon-white"></i> NO REDIRECT URI</span></div>
|
||||||
|
<% }
|
||||||
|
} else { %>
|
||||||
<div><span class="muted">
|
<div><span class="muted">
|
||||||
<% for (var i in client.redirectUris) {
|
<% for (var i in client.redirectUris) {
|
||||||
var uri = $.url(client.redirectUris[i]);
|
var uri = $.url(client.redirectUris[i]);
|
||||||
if (uri.attr('protocol') == 'http' && uri.attr('host') != 'localhost') {
|
if (!uri.attr('protocol')) {
|
||||||
|
%><b class="text-error" title="unknown protocol scheme">?</b><%
|
||||||
|
} else if (uri.attr('protocol') == 'http' && uri.attr('host') != 'localhost') {
|
||||||
%><b class="text-error"><%- uri.attr('protocol') %></b>://<%
|
%><b class="text-error"><%- uri.attr('protocol') %></b>://<%
|
||||||
} else if (uri.attr('protocol') != 'https' && uri.attr('protocol') != 'http') {
|
} else if (uri.attr('protocol') != 'https' && uri.attr('protocol') != 'http') {
|
||||||
%><span class="text-warning"><%- uri.attr('protocol') %></span>://<%
|
%><span class="text-warning"><%- uri.attr('protocol') %></span>://<%
|
||||||
|
|
|
@ -191,6 +191,13 @@
|
||||||
<script type="text/html" id="tmpl-scope-list">
|
<script type="text/html" id="tmpl-scope-list">
|
||||||
|
|
||||||
<%
|
<%
|
||||||
|
if (_.isEmpty(scopes)) {
|
||||||
|
%>
|
||||||
|
<span class="badge badge-important"><i class="icon-warning-sign icon-white"></i> NO SCOPES</span>
|
||||||
|
<%
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
_.each(scopes, function(s) {
|
_.each(scopes, function(s) {
|
||||||
var ss = systemScopes.getByValue(s);
|
var ss = systemScopes.getByValue(s);
|
||||||
|
|
||||||
|
@ -215,6 +222,8 @@ style="cursor: default;" >
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
%>
|
%>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue