Skip to content

Commit

Permalink
Remove client logo URI from DTO and from service logic
Browse files Browse the repository at this point in the history
  • Loading branch information
enricovianello committed Jan 22, 2024
1 parent a57792b commit 261fad3
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ public RegisteredClientDTO registeredClientDtoFromEntity(ClientDetailsEntity ent
.collect(toSet()));

clientDTO.setJwksUri(entity.getJwksUri());
clientDTO.setLogoUri(entity.getLogoUri());
clientDTO.setRedirectUris(cloneSet(entity.getRedirectUris()));

clientDTO.setTokenEndpointAuthMethod(TokenEndpointAuthenticationMethod
Expand All @@ -139,7 +138,6 @@ public RegisteredClientDTO registeredClientDtoFromEntity(ClientDetailsEntity ent
clientDTO.setJwksUri(entity.getJwksUri());

Optional.ofNullable(entity.getJwks()).ifPresent(k -> clientDTO.setJwk(k.toString()));
clientDTO.setLogoUri(entity.getLogoUri());
clientDTO.setPolicyUri(entity.getPolicyUri());
clientDTO.setRefreshTokenValiditySeconds(entity.getRefreshTokenValiditySeconds());

Expand Down Expand Up @@ -185,7 +183,6 @@ public ClientDetailsEntity entityFromRegistrationRequest(RegisteredClientDTO dto
client.setJwks(JWKSet.parse(dto.getJwk()));
}

client.setLogoUri(dto.getLogoUri());
client.setPolicyUri(dto.getPolicyUri());

client.setRedirectUris(cloneSet(dto.getRedirectUris()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,6 @@ public class RegisteredClientDTO {
ClientViews.DynamicRegistration.class})
private String clientUri;

@Size(max = 2048,
groups = {OnDynamicClientRegistration.class, OnDynamicClientUpdate.class,
OnClientCreation.class, OnClientUpdate.class})
@URL(groups = {OnDynamicClientRegistration.class, OnDynamicClientUpdate.class,
OnClientCreation.class, OnClientUpdate.class})
@JsonView({ClientViews.Full.class, ClientViews.ClientManagement.class,
ClientViews.DynamicRegistration.class})
private String logoUri;

@Size(max = 2048,
groups = {OnDynamicClientRegistration.class, OnDynamicClientUpdate.class,
OnClientCreation.class, OnClientUpdate.class})
Expand Down Expand Up @@ -304,14 +295,6 @@ public void setClientUri(String clientUri) {
this.clientUri = clientUri;
}

public String getLogoUri() {
return logoUri;
}

public void setLogoUri(String logoUri) {
this.logoUri = logoUri;
}

public String getTosUri() {
return tosUri;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@
</c:otherwise>
</c:choose>
</h2>
<c:if test="${ not empty client.logoUri }">
<img src="api/clients/${ client.id }/logo" width="60" height="60" />
</c:if>

<c:if
test="${ (not empty client.clientDescription) || (not empty client.clientUri) || (not empty client.policyUri) || (not empty client.tosUri) || (not empty contacts) }">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@
the consent page
</p>
</div>
<div class="form-group">
<label for="logo">Logo</label>
<input id="logo" name="logo" class="form-control" type="url" ng-model="$ctrl.client.logo_uri"
placeholder="https://app.example.org/logo.png">
<p class="help-block">
URL that points to a logo image,
will be displayed to the user in the consent
page
</p>
</div>
<div class="form-group">
<label for="tos_uri">Terms of service</label>
<input id="tos_uri" name="tos_uri" class="form-control" type="url" ng-model="$ctrl.client.tos_uri"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE client_details set logo_uri = NULL;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE client_details set logo_uri = NULL;

0 comments on commit 261fad3

Please sign in to comment.