Skip to content

Commit

Permalink
fix(jans-auth-server): new jans server installation show null in plac…
Browse files Browse the repository at this point in the history
…e of client_name #9415 (#9523)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>
  • Loading branch information
yuriyz authored Sep 19, 2024
1 parent 9b4f5cf commit 23ef80c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,25 @@ public void setClaims(String claims) {
this.claims = claims;
}

public String getClientDisplayName() {
log.trace("client {}", clientId);

if (StringUtils.isBlank(clientId)) {
return "Unknown";
}

final Client client = clientService.getClient(clientId);
if (StringUtils.isNotBlank(client.getClientName())) {
return client.getClientName();
}

if (StringUtils.isNotBlank(client.getClientId())) {
return client.getClientId();
}

return "Unknown";
}

public String getAuthReqId() {
return authReqId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<h:outputFormat
value="#{msgs['authorize.requestingPermissionForScopes']}">
<f:param
value="#{empty client.getClientName()? client.getClientId() : client.getClientName()}" />
value="#{authorizeAction.clientDisplayName}" />
</h:outputFormat>
</p>
</h3>
Expand Down

0 comments on commit 23ef80c

Please sign in to comment.