From 14f2efae100f9eb6e1587759e93c8f63fee9a38e Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Tue, 7 Oct 2014 21:43:53 -0400 Subject: [PATCH] added warnings for empty scopes and empty redirect URI lists --- .../src/main/webapp/resources/template/client.html | 12 ++++++++++-- .../src/main/webapp/resources/template/scope.html | 9 +++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/openid-connect-server-webapp/src/main/webapp/resources/template/client.html b/openid-connect-server-webapp/src/main/webapp/resources/template/client.html index 6d1192bec..62ad1e33b 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/template/client.html +++ b/openid-connect-server-webapp/src/main/webapp/resources/template/client.html @@ -51,11 +51,19 @@ - <% if (client.redirectUris) { %> + <% if (_.isEmpty(client.redirectUris)) { + if (_.contains(client.grantTypes, 'authorization_code') || + _.contains(client.grantTypes, 'implicit')) { + %> +
NO REDIRECT URI
+ <% } + } else { %>
<% for (var i in client.redirectUris) { var uri = $.url(client.redirectUris[i]); - if (uri.attr('protocol') == 'http' && uri.attr('host') != 'localhost') { + if (!uri.attr('protocol')) { + %>?<% + } else if (uri.attr('protocol') == 'http' && uri.attr('host') != 'localhost') { %><%- uri.attr('protocol') %>://<% } else if (uri.attr('protocol') != 'https' && uri.attr('protocol') != 'http') { %><%- uri.attr('protocol') %>://<% diff --git a/openid-connect-server-webapp/src/main/webapp/resources/template/scope.html b/openid-connect-server-webapp/src/main/webapp/resources/template/scope.html index 0c6504d17..e2de14300 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/template/scope.html +++ b/openid-connect-server-webapp/src/main/webapp/resources/template/scope.html @@ -191,6 +191,13 @@