diff --git a/jans-auth-server/server/src/main/java/io/jans/as/server/authorize/ws/rs/AuthorizeAction.java b/jans-auth-server/server/src/main/java/io/jans/as/server/authorize/ws/rs/AuthorizeAction.java index b45d58f8b99..bb069042c27 100644 --- a/jans-auth-server/server/src/main/java/io/jans/as/server/authorize/ws/rs/AuthorizeAction.java +++ b/jans-auth-server/server/src/main/java/io/jans/as/server/authorize/ws/rs/AuthorizeAction.java @@ -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; } diff --git a/jans-auth-server/server/src/main/webapp/WEB-INF/incl/layout/authorize-extended-template.xhtml b/jans-auth-server/server/src/main/webapp/WEB-INF/incl/layout/authorize-extended-template.xhtml index 12fa0189d71..e8b03eafc30 100644 --- a/jans-auth-server/server/src/main/webapp/WEB-INF/incl/layout/authorize-extended-template.xhtml +++ b/jans-auth-server/server/src/main/webapp/WEB-INF/incl/layout/authorize-extended-template.xhtml @@ -46,7 +46,7 @@ + value="#{authorizeAction.clientDisplayName}" />