Skip to content

Commit

Permalink
Added client name in /iam/api/access-tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
rmiccoli committed Feb 2, 2022
1 parent 3a7d27a commit bfc3bfc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ private ClientRef buildClientRef(String clientId) {
return ClientRef.builder()
.id(cd.getId())
.clientId(cd.getClientId())
.clientName(cd.getClientName())
.contacts(cd.getContacts())
.ref(cd.getClientUri())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ public class ClientRef {

private Long id;
private String clientId;
private String clientName;
private Set<String> contacts;
private String ref = null;

@JsonCreator
public ClientRef(@JsonProperty("id") Long id, @JsonProperty("clientId") String clientId,
public ClientRef(@JsonProperty("id") Long id, @JsonProperty("clientId") String clientId, @JsonProperty("clientName") String clientName,
@JsonProperty("contacts") Set<String> contacts, @JsonProperty("$ref") String ref) {

this.id = id;
this.clientId = clientId;
this.clientName = clientName;
this.contacts = contacts;
this.ref = ref;
}
Expand All @@ -43,6 +45,7 @@ public ClientRef(Builder builder) {

this.id = builder.id;
this.clientId = builder.clientId;
this.clientName = builder.clientName;
this.contacts = builder.contacts;
this.ref = builder.ref;
}
Expand All @@ -58,6 +61,12 @@ public String getClientId() {

return clientId;
}

@JsonProperty("clientName")
public String getClientName() {

return clientName;
}

@JsonProperty("contacts")
public Set<String> getContacts() {
Expand All @@ -74,7 +83,7 @@ public String getRef() {
@Override
public String toString() {

return "Client [id=" + id + ", clientId=" + clientId + ", contacts=" + contacts
return "Client [id=" + id + ", clientId=" + clientId + ", clientName=" + clientName + ", contacts=" + contacts
+ ", ref=" + ref + "]";
}

Expand All @@ -87,6 +96,7 @@ public static class Builder {

private Long id;
private String clientId;
private String clientName;
private Set<String> contacts;
private String ref;

Expand All @@ -99,6 +109,11 @@ public Builder clientId(String clientId) {
this.clientId = clientId;
return this;
}

public Builder clientName(String clientName) {
this.clientName = clientName;
return this;
}

public Builder contacts(Set<String> contacts) {
this.contacts = contacts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
<h5>{{$index + $ctrl.currentOffset}}</h5>
</td>
<td class="align-middle">
<h5><a ui-sref="client({id: token.client.clientId})">{{token.client.clientId}}</a></h5>
<a ui-sref="client({id: token.client.clientId})">{{token.client.clientName}}</a>
<br/>
<small>{{token.client.clientId}}</small>
</td>
<td class="align-middle" ng-if="token.user != null">
<a ui-sref="user({id: token.user.id})">{{token.user.userName}}</a>
Expand Down

0 comments on commit bfc3bfc

Please sign in to comment.