Skip to content

Commit 32fad01

Browse files
committed
Body not needed in AccessTokenTO
1 parent d916009 commit 32fad01

9 files changed

Lines changed: 0 additions & 48 deletions

File tree

‎client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java‎

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@
1818
*/
1919
package org.apache.syncope.client.console.panels;
2020

21-
import com.nimbusds.jwt.SignedJWT;
2221
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
23-
import java.text.ParseException;
2422
import java.util.ArrayList;
2523
import java.util.Collection;
2624
import java.util.Iterator;
2725
import java.util.List;
28-
import org.apache.commons.lang3.StringUtils;
2926
import org.apache.syncope.client.console.SyncopeConsoleSession;
3027
import org.apache.syncope.client.console.commons.DirectoryDataProvider;
3128
import org.apache.syncope.client.console.commons.IdRepoConstants;
@@ -43,13 +40,9 @@
4340
import org.apache.syncope.common.lib.types.IdRepoEntitlement;
4441
import org.apache.wicket.PageReference;
4542
import org.apache.wicket.ajax.AjaxRequestTarget;
46-
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
4743
import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
48-
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
4944
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
5045
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
51-
import org.apache.wicket.markup.html.basic.Label;
52-
import org.apache.wicket.markup.repeater.Item;
5346
import org.apache.wicket.model.CompoundPropertyModel;
5447
import org.apache.wicket.model.IModel;
5548
import org.apache.wicket.model.ResourceModel;
@@ -90,28 +83,6 @@ protected List<IColumn<AccessTokenTO, String>> getColumns() {
9083

9184
columns.add(new PropertyColumn<>(new ResourceModel("owner"), "owner", "owner"));
9285

93-
columns.add(new AbstractColumn<>(new ResourceModel("issuedAt", "")) {
94-
95-
private static final long serialVersionUID = -1822504503325964706L;
96-
97-
@Override
98-
public void populateItem(
99-
final Item<ICellPopulator<AccessTokenTO>> cellItem,
100-
final String componentId,
101-
final IModel<AccessTokenTO> model) {
102-
103-
try {
104-
SignedJWT jwt = SignedJWT.parse(model.getObject().getBody());
105-
cellItem.add(new Label(
106-
componentId,
107-
SyncopeConsoleSession.get().getDateFormat().format(jwt.getJWTClaimsSet().getIssueTime())));
108-
} catch (ParseException e) {
109-
LOG.error("Could not parse JWT {}", model.getObject().getBody(), e);
110-
cellItem.add(new Label(componentId, StringUtils.EMPTY));
111-
}
112-
}
113-
});
114-
11586
columns.add(new DatePropertyColumn<>(new ResourceModel("expirationTime"), "expirationTime", "expirationTime"));
11687

11788
return columns;

‎client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.properties‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ any.edit=Edit access token ${accessTokenTO.owner}
1818
any.new=New access token
1919
owner=Owner
2020
expirationTime=Expiry
21-
issuedAt=Start

‎client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_fr_CA.properties‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ any.edit=Jeton modification acc\u00e8s ${accessTokenTO.owner}
1818
any.new=Jeton nouvel acc\u00e8s
1919
owner=Propri\u00e9taire
2020
expirationTime=Expiration
21-
issuedAt=D\u00e9but

‎client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_it.properties‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ any.edit=Modifica token di accesso ${accessTokenTO.owner}
1818
any.new=Nuovo token di accesso
1919
owner=Proprietario
2020
expirationTime=Termine
21-
issuedAt=Inizio

‎client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_ja.properties‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ any.edit=\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3 ${accessTokenTO.owner}
1818
any.new=\u65b0\u3057\u3044\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3
1919
owner=\u30aa\u30fc\u30ca\u30fc
2020
expirationTime=\u671f\u9650
21-
issuedAt=\u958b\u59cb

‎client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_pt_BR.properties‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ any.edit=Edit access token ${accessTokenTO.owner}
1818
any.new=Novo token de acesso
1919
owner=Propriet\u00e1rio
2020
expirationTime=Termo
21-
issuedAt=Iniciar

‎client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_ru.properties‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ any.edit=Edit access token ${accessTokenTO.owner}
1919
any.new=\u041d\u043e\u0432\u044b\u0439 \u043c\u0430\u0440\u043a\u0435\u0440 \u0434\u043e\u0441\u0442\u0443\u043f\u0430
2020
owner=\u0412\u043b\u0430\u0434\u0435\u043b\u0435\u0446
2121
expirationTime=\u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u043e\u043a\u0430
22-
issuedAt=\u041d\u0430\u0447\u0430\u043b\u043e

‎common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/AccessTokenTO.java‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public class AccessTokenTO implements EntityTO {
2828

2929
private String key;
3030

31-
private String body;
32-
3331
private OffsetDateTime expirationTime;
3432

3533
private String owner;
@@ -44,14 +42,6 @@ public void setKey(final String key) {
4442
this.key = key;
4543
}
4644

47-
public String getBody() {
48-
return body;
49-
}
50-
51-
public void setBody(final String body) {
52-
this.body = body;
53-
}
54-
5545
public OffsetDateTime getExpirationTime() {
5646
return expirationTime;
5747
}
@@ -82,7 +72,6 @@ public boolean equals(final Object obj) {
8272
AccessTokenTO other = (AccessTokenTO) obj;
8373
return new EqualsBuilder().
8474
append(key, other.key).
85-
append(body, other.body).
8675
append(expirationTime, other.expirationTime).
8776
append(owner, other.owner).
8877
build();
@@ -92,7 +81,6 @@ public boolean equals(final Object obj) {
9281
public int hashCode() {
9382
return new HashCodeBuilder().
9483
append(key).
95-
append(body).
9684
append(expirationTime).
9785
append(owner).
9886
build();

‎core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ public AccessTokenInfo update(final AccessToken accessToken, final byte[] author
198198
public AccessTokenTO getAccessTokenTO(final AccessToken accessToken) {
199199
AccessTokenTO accessTokenTO = new AccessTokenTO();
200200
accessTokenTO.setKey(accessToken.getKey());
201-
accessTokenTO.setBody(accessToken.getBody());
202201
accessTokenTO.setExpirationTime(accessToken.getExpirationTime());
203202
accessTokenTO.setOwner(accessToken.getOwner());
204203

0 commit comments

Comments
 (0)