Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Commit 775e2e8

Browse files
author
Dominik František Bučík
authored
refactor: 💡 Remove logos from clients (#23)
DB update can be done - drop column logo_uri from clients BREAKING CHANGE: 🧨 Removed logo from clients
1 parent d17c11c commit 775e2e8

30 files changed

+1558
-2031
lines changed

openid-connect-server-webapp/src/main/resources/db/hsql/hsql_database_tables.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ CREATE TABLE IF NOT EXISTS client_details (
143143
token_endpoint_auth_method VARCHAR(256),
144144
subject_type VARCHAR(256),
145145

146-
logo_uri VARCHAR(2048),
147146
policy_uri VARCHAR(2048),
148147
client_uri VARCHAR(2048),
149148
tos_uri VARCHAR(2048),

openid-connect-server-webapp/src/main/resources/db/mysql/mysql_database_tables.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ CREATE TABLE IF NOT EXISTS client_details (
142142
token_endpoint_auth_method VARCHAR(256),
143143
subject_type VARCHAR(256),
144144

145-
logo_uri VARCHAR(2048),
146145
policy_uri VARCHAR(2048),
147146
client_uri VARCHAR(2048),
148147
tos_uri VARCHAR(2048),

openid-connect-server-webapp/src/main/resources/db/oracle/oracle_database_tables.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ CREATE TABLE client_details (
153153
token_endpoint_auth_method VARCHAR2(256),
154154
subject_type VARCHAR2(256),
155155

156-
logo_uri VARCHAR2(2048),
157156
policy_uri VARCHAR2(2048),
158157
client_uri VARCHAR2(2048),
159158
tos_uri VARCHAR2(2048),

openid-connect-server-webapp/src/main/resources/db/psql/psql_database_tables.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ CREATE TABLE IF NOT EXISTS client_details (
143143
token_endpoint_auth_method VARCHAR(256),
144144
subject_type VARCHAR(256),
145145

146-
logo_uri VARCHAR(2048),
147146
policy_uri VARCHAR(2048),
148147
client_uri VARCHAR(2048),
149148
tos_uri VARCHAR(2048),

openid-connect-server-webapp/src/main/webapp/WEB-INF/views/approve.jsp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -82,38 +82,6 @@
8282
</c:choose>
8383
</c:if>
8484

85-
<c:if test="${ not empty client.logoUri }">
86-
<ul class="thumbnails">
87-
<li class="span5">
88-
<a class="thumbnail" data-toggle="modal" data-target="#logoModal"><img src="api/clients/${ client.id }/logo" /></a>
89-
</li>
90-
</ul>
91-
<!-- Modal -->
92-
<div id="logoModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="logoModalLabel" aria-hidden="true">
93-
<div class="modal-header">
94-
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
95-
<h3 id="logoModalLabel">
96-
<c:choose>
97-
<c:when test="${empty client.clientName}">
98-
<em><c:out value="${client.clientId}" /></em>
99-
</c:when>
100-
<c:otherwise>
101-
<em><c:out value="${client.clientName}" /></em>
102-
</c:otherwise>
103-
</c:choose>
104-
</h3>
105-
</div>
106-
<div class="modal-body">
107-
<img src="api/clients/${ client.id }/logo" />
108-
<c:if test="${ not empty client.clientUri }">
109-
<a href="<c:out value="${ client.clientUri }" />"><c:out value="${ client.clientUri }" /></a>
110-
</c:if>
111-
</div>
112-
<div class="modal-footer">
113-
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
114-
</div>
115-
</div>
116-
</c:if>
11785
<c:if test="${ (not empty client.clientDescription) || (not empty client.clientUri) || (not empty client.policyUri) || (not empty client.tosUri) || (not empty contacts) }">
11886
<div class="muted moreInformationContainer">
11987
<c:out value="${client.clientDescription}" />

openid-connect-server-webapp/src/main/webapp/WEB-INF/views/approveDevice.jsp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -82,38 +82,6 @@
8282
</c:choose>
8383
</c:if>
8484

85-
<c:if test="${ not empty client.logoUri }">
86-
<ul class="thumbnails">
87-
<li class="span5">
88-
<a class="thumbnail" data-toggle="modal" data-target="#logoModal"><img src="api/clients/${ client.id }/logo" /></a>
89-
</li>
90-
</ul>
91-
<!-- Modal -->
92-
<div id="logoModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="logoModalLabel" aria-hidden="true">
93-
<div class="modal-header">
94-
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
95-
<h3 id="logoModalLabel">
96-
<c:choose>
97-
<c:when test="${empty client.clientName}">
98-
<em><c:out value="${client.clientId}" /></em>
99-
</c:when>
100-
<c:otherwise>
101-
<em><c:out value="${client.clientName}" /></em>
102-
</c:otherwise>
103-
</c:choose>
104-
</h3>
105-
</div>
106-
<div class="modal-body">
107-
<img src="api/clients/${ client.id }/logo" />
108-
<c:if test="${ not empty client.clientUri }">
109-
<a href="<c:out value="${ client.clientUri }" />"><c:out value="${ client.clientUri }" /></a>
110-
</c:if>
111-
</div>
112-
<div class="modal-footer">
113-
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
114-
</div>
115-
</div>
116-
</c:if>
11785
<c:if test="${ (not empty client.clientDescription) || (not empty client.clientUri) || (not empty client.policyUri) || (not empty client.tosUri) || (not empty contacts) }">
11886
<div class="muted moreInformationContainer">
11987
<c:out value="${client.clientDescription}" />

openid-connect-server-webapp/src/main/webapp/resources/css/mitreid-connect.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,6 @@ h1,label {
187187
height: 20px;
188188
}
189189

190-
/* Client table images */
191-
.client-logo {
192-
max-width: 64px;
193-
max-height: 64px
194-
}
195-
196190
/* Modal and sheet fight for the same z-index otherwise */
197191
.modal-backdrop {
198192
z-index: 2040;

openid-connect-server-webapp/src/main/webapp/resources/js/client.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ var ClientModel = Backbone.Model.extend({
4040
redirectUris: [],
4141
clientName: null,
4242
clientUri: null,
43-
logoUri: null,
4443
contacts: [],
4544
tosUri: null,
4645
tokenEndpointAuthMethod: null,
@@ -131,9 +130,6 @@ var ClientModel = Backbone.Model.extend({
131130
if (this.get('tosUri') != null && this.get('tosUri').toLowerCase().indexOf(term.toLowerCase()) != -1) {
132131
matches.push($.t('client.client-table.match.terms'));
133132
}
134-
if (this.get('logoUri') != null && this.get('logoUri').toLowerCase().indexOf(term.toLowerCase()) != -1) {
135-
matches.push($.t('client.client-table.match.logo'));
136-
}
137133
if (this.get('contacts') != null) {
138134
var f = _.filter(this.get('contacts'), function(item) {
139135
return item.toLowerCase().indexOf(term.toLowerCase()) != -1;
@@ -720,7 +716,6 @@ var ClientFormView = Backbone.View.extend({
720716
"change #tokenEndpointAuthMethod input:radio": "toggleClientCredentials",
721717
"change #displayClientSecret": "toggleDisplayClientSecret",
722718
"change #generateClientSecret": "toggleGenerateClientSecret",
723-
"change #logoUri input": "previewLogo",
724719
"change #jwkSelector input:radio": "toggleJWKSetType"
725720
},
726721

@@ -760,16 +755,6 @@ var ClientFormView = Backbone.View.extend({
760755
$("#refreshTokenValidityTime", this.$el).toggle();
761756
},
762757

763-
previewLogo: function() {
764-
if ($('#logoUri input', this.el).val()) {
765-
$('#logoPreview', this.el).empty();
766-
$('#logoPreview', this.el).attr('src', $('#logoUri input', this.el).val());
767-
} else {
768-
// $('#logoBlock', this.el).hide();
769-
$('#logoPreview', this.el).attr('src', 'resources/images/logo_placeholder.gif');
770-
}
771-
},
772-
773758
/**
774759
* Set up the form based on the current state of the tokenEndpointAuthMethod
775760
* parameter
@@ -1047,7 +1032,6 @@ var ClientFormView = Backbone.View.extend({
10471032
generateClientSecret: generateClientSecret,
10481033
redirectUris: redirectUris,
10491034
clientDescription: this.emptyToNull($('#clientDescription textarea').val()),
1050-
logoUri: this.emptyToNull($('#logoUri input').val()),
10511035
grantTypes: grantTypes,
10521036
accessTokenValiditySeconds: accessTokenValiditySeconds,
10531037
refreshTokenValiditySeconds: refreshTokenValiditySeconds,
@@ -1297,7 +1281,6 @@ var ClientFormView = Backbone.View.extend({
12971281

12981282
// toggle other dynamic fields
12991283
this.toggleClientCredentials();
1300-
this.previewLogo();
13011284
this.toggleJWKSetType();
13021285

13031286
// disable unsupported JOSE algorithms

openid-connect-server-webapp/src/main/webapp/resources/js/dynreg.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ var DynRegClient = Backbone.Model.extend({
2424
redirect_uris: [],
2525
client_name: null,
2626
client_uri: null,
27-
logo_uri: null,
2827
contacts: [],
2928
tos_uri: null,
3029
token_endpoint_auth_method: null,
@@ -242,7 +241,6 @@ var DynRegEditView = Backbone.View.extend({
242241
"click .btn-save": "saveClient",
243242
"click .btn-cancel": "cancel",
244243
"click .btn-delete": "deleteClient",
245-
"change #logoUri input": "previewLogo",
246244
"change #tokenEndpointAuthMethod input:radio": "toggleClientCredentials",
247245
"change #jwkSelector input:radio": "toggleJWKSetType"
248246
},
@@ -279,16 +277,6 @@ var DynRegEditView = Backbone.View.extend({
279277
return false;
280278
},
281279

282-
previewLogo: function() {
283-
if ($('#logoUri input', this.el).val()) {
284-
$('#logoPreview', this.el).empty();
285-
$('#logoPreview', this.el).attr('src', $('#logoUri input', this.el).val());
286-
} else {
287-
// $('#logoBlock', this.el).hide();
288-
$('#logoPreview', this.el).attr('src', 'resources/images/logo_placeholder.gif');
289-
}
290-
},
291-
292280
/**
293281
* Set up the form based on the current state of the tokenEndpointAuthMethod
294282
* parameter
@@ -458,7 +446,6 @@ var DynRegEditView = Backbone.View.extend({
458446
var attrs = {
459447
client_name: this.emptyToNull($('#clientName input').val()),
460448
redirect_uris: redirectUris,
461-
logo_uri: this.emptyToNull($('#logoUri input').val()),
462449
grant_types: grantTypes,
463450
scope: scopes,
464451
client_secret: null, // never send a client secret
@@ -680,7 +667,6 @@ var DynRegEditView = Backbone.View.extend({
680667
this.listWidgetViews.push(defaultAcrView);
681668

682669
this.toggleClientCredentials();
683-
this.previewLogo();
684670
this.toggleJWKSetType();
685671

686672
// disable unsupported JOSE algorithms

openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@
8787
"jwk-set": "Public Key Set",
8888
"jwk-set-help": "URL for the client's JSON Web Key set (must be reachable by the server)",
8989
"jwk-set-value-help": "URL for the client's JSON Web Key set (must be reachable by the server)",
90-
"logo": "Logo",
91-
"logo-help": "URL that points to a logo image, will be displayed on approval page",
9290
"main": "Main",
9391
"max-age": "Default Max Age",
9492
"max-age-help": "Default maximum session age before re-prompting",
@@ -197,7 +195,6 @@
197195
"description": "description",
198196
"homepage": "home page",
199197
"id": "id",
200-
"logo": "logo",
201198
"name": "name",
202199
"policy": "policy",
203200
"redirect": "redirect uri",

0 commit comments

Comments
 (0)