Skip to content

Commit

Permalink
Registered clients disappear #1199
Browse files Browse the repository at this point in the history
  • Loading branch information
yurem committed Nov 26, 2019
1 parent 773a785 commit 979afd2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Expand Up @@ -52,7 +52,7 @@ public class Client extends DeletableEntity implements Serializable, ClientRefer
@AttributeName(name = "oxAuthClientIdIssuedAt")
private Date clientIdIssuedAt;

@AttributeName(name = "oxAuthClientSecretExpiresAt")
@AttributeName(name = "oxAuthExpiration")
private Date clientSecretExpiresAt;

@AttributeName(name = "oxAuthRedirectURI")
Expand Down Expand Up @@ -215,6 +215,9 @@ public class Client extends DeletableEntity implements Serializable, ClientRefer
@JsonObject
private ClientAttributes attributes;

@AttributeName(name = "del")
private boolean deletable;

public ClientAttributes getAttributes() {
if (attributes == null) {
attributes = new ClientAttributes();
Expand Down Expand Up @@ -1172,7 +1175,15 @@ public void setSoftwareStatement(String softwareStatement) {
this.softwareStatement = softwareStatement;
}

public static Client instance() {
public boolean isDeletable() {
return deletable;
}

public void setDeletable(boolean deletable) {
this.deletable = deletable;
}

public static Client instance() {
return new Client();
}

Expand Down
Expand Up @@ -225,6 +225,7 @@ private Response registerClientImpl(String requestParams, HttpServletRequest htt
if (appConfiguration.getDynamicRegistrationExpirationTime() > 0) { // #883 : expiration can be -1, mean does not expire
calendar.add(Calendar.SECOND, appConfiguration.getDynamicRegistrationExpirationTime());
client.setClientSecretExpiresAt(calendar.getTime());
client.setDeletable(true);
client.setExpirationDate(calendar.getTime());
}

Expand Down

0 comments on commit 979afd2

Please sign in to comment.