Mark confidential clients as slightly more secure
Change-Id: I1dd223773accfd9bdd1c2d70cdf8d6754c71c243
diff --git a/Changes b/Changes
index 3d2d514..9f1f159 100755
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
-0.45 2022-04-13
+0.45 2022-04-28
- Added confidential client support to OAuth. (diewald)
- Added OAuth client authorization handling. (diewald)
+ - Mark public clients as slightly more insecure. (diewald)
0.44 2022-02-31
- Fixed autosecrets migration. (diewald)
diff --git a/dev/scss/base/icons.scss b/dev/scss/base/icons.scss
index 2db98d6..4d4a37c 100644
--- a/dev/scss/base/icons.scss
+++ b/dev/scss/base/icons.scss
@@ -31,7 +31,7 @@
$fa-metadata: "\f055";
$fa-to-query: "\f102";
$fa-cut: "\f0c4";
-$fa-plugin: "\f1e6";
+$fa-client: "\f1e6";
$fa-referto: "\f0c5";
$fa-redo: "\f01e";
$fa-warn: "\f071";
@@ -39,3 +39,5 @@
$fa-show: "\f06e";
$fa-hide: "\f070";
$fa-copy: "\f0c5";
+$fa-confidential: "\f023";
+$fa-plugin: "\f12e";
diff --git a/dev/scss/main/oauth.scss b/dev/scss/main/oauth.scss
index c1e38c1..262b2b4 100644
--- a/dev/scss/main/oauth.scss
+++ b/dev/scss/main/oauth.scss
@@ -36,12 +36,27 @@
@include icon-font;
display: inline-block;
width: 1.5em;
- content: $fa-plugin;
+ content: $fa-client;
color: $ids-blue-1;
font-size: 100%;
}
}
+.client-type-confidential::after {
+ @include icon-font;
+ margin-left: .3em;
+ display: inline-block;
+ width: 1.5em;
+ font-size: 70%;
+ line-hight: top;
+ vertical-align: text-top;
+}
+
+.client-type-confidential::after {
+ content: $fa-confidential;
+ color: $ids-blue-1;
+}
+
li.token {
list-style-type: none;
}
diff --git a/lib/Kalamar/Plugin/Auth/templates/auth/client.html.ep b/lib/Kalamar/Plugin/Auth/templates/auth/client.html.ep
index de9e3a6..441c8e6 100644
--- a/lib/Kalamar/Plugin/Auth/templates/auth/client.html.ep
+++ b/lib/Kalamar/Plugin/Auth/templates/auth/client.html.ep
@@ -7,7 +7,7 @@
<legend><%= loc 'Auth_clientCredentials' %></legend>
<ul class="client-list">
<li class="client">
- <span class="client-name"><%= stash 'client_name' %></span>
+ <span class="client-name client-type-<%= lc(stash('client_type') // 'PUBLIC') %>"><%= stash 'client_name' %></span>
% if (stash('client_desc')) {
<p class="client-desc"><%= stash 'client_desc' %></p>
% };
diff --git a/lib/Kalamar/Plugin/Auth/templates/auth/clients.html.ep b/lib/Kalamar/Plugin/Auth/templates/auth/clients.html.ep
index cee1abd..4016919 100644
--- a/lib/Kalamar/Plugin/Auth/templates/auth/clients.html.ep
+++ b/lib/Kalamar/Plugin/Auth/templates/auth/clients.html.ep
@@ -7,7 +7,7 @@
<ul class="client-list">
% foreach (@$list) {
<li class="client">
- <span class="client-name"><%= link_to $_->{client_name} => url_for('oauth-tokens', client_id => $_->{client_id}) %></span>
+ <span class="client-name client-type-<%= lc($_->{'client_type'} // 'PUBLIC') %>"><%= link_to $_->{client_name} => url_for('oauth-tokens', client_id => $_->{client_id}) %></span>
% if ($_->{client_description}) {
<p class="client-desc"><%= $_->{client_description} %></p>
% };
@@ -33,10 +33,10 @@
<div>
%= label_for type => loc('Auth_clientType'), class => 'field-required'
<%= radio_button type => 'PUBLIC', checked => 'checked' %>
- <label>Public</label>
+ <label class="client-type-public">Public</label>
<br />
<%= radio_button type => 'CONFIDENTIAL' %>
- <label>Confidential</label>
+ <label class="client-type-confidential">Confidential</label>
</div>
<div>