changed expires_at -> client_secret_expires_at, issued_at -> client_id_issued_at
parent
3f7fe30f5c
commit
c760ebf4a4
|
@ -24,8 +24,8 @@ public class RegisteredClient {
|
|||
// these fields are needed in addition to the ones in ClientDetailsEntity
|
||||
private String registrationAccessToken;
|
||||
private String registrationClientUri;
|
||||
private Date expiresAt;
|
||||
private Date issuedAt;
|
||||
private Date clientSecretExpiresAt;
|
||||
private Date clientIdIssuedAt;
|
||||
private ClientDetailsEntity client;
|
||||
|
||||
/**
|
||||
|
@ -692,28 +692,28 @@ public class RegisteredClient {
|
|||
this.registrationClientUri = registrationClientUri;
|
||||
}
|
||||
/**
|
||||
* @return the expiresAt
|
||||
* @return the clientSecretExpiresAt
|
||||
*/
|
||||
public Date getExpiresAt() {
|
||||
return expiresAt;
|
||||
public Date getClientSecretExpiresAt() {
|
||||
return clientSecretExpiresAt;
|
||||
}
|
||||
/**
|
||||
* @param expiresAt the expiresAt to set
|
||||
* @param clientSecretExpiresAt the clientSecretExpiresAt to set
|
||||
*/
|
||||
public void setExpiresAt(Date expiresAt) {
|
||||
this.expiresAt = expiresAt;
|
||||
public void setClientSecretExpiresAt(Date expiresAt) {
|
||||
this.clientSecretExpiresAt = expiresAt;
|
||||
}
|
||||
/**
|
||||
* @return the issuedAt
|
||||
* @return the clientIdIssuedAt
|
||||
*/
|
||||
public Date getIssuedAt() {
|
||||
return issuedAt;
|
||||
public Date getClientIdIssuedAt() {
|
||||
return clientIdIssuedAt;
|
||||
}
|
||||
/**
|
||||
* @param issuedAt the issuedAt to set
|
||||
* @param clientIdIssuedAt the clientIdIssuedAt to set
|
||||
*/
|
||||
public void setIssuedAt(Date issuedAt) {
|
||||
this.issuedAt = issuedAt;
|
||||
public void setClientIdIssuedAt(Date issuedAt) {
|
||||
this.clientIdIssuedAt = issuedAt;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -157,8 +157,8 @@ public class ClientDetailsEntityJsonProcessor {
|
|||
// get any fields from the registration
|
||||
rc.setRegistrationAccessToken(getAsString(o, "registration_access_token"));
|
||||
rc.setRegistrationClientUri(getAsString(o, "registration_client_uri"));
|
||||
rc.setIssuedAt(getAsDate(o, "issued_at"));
|
||||
rc.setExpiresAt(getAsDate(o, "expires_at"));
|
||||
rc.setClientIdIssuedAt(getAsDate(o, "client_id_issued_at"));
|
||||
rc.setClientSecretExpiresAt(getAsDate(o, "client_secret_expires_at"));
|
||||
|
||||
return rc;
|
||||
} else {
|
||||
|
@ -179,17 +179,17 @@ public class ClientDetailsEntityJsonProcessor {
|
|||
if (c.getClientSecret() != null) {
|
||||
o.addProperty("client_secret", c.getClientSecret());
|
||||
|
||||
if (c.getExpiresAt() == null) {
|
||||
o.addProperty("expires_at", 0); // TODO: do we want to let secrets expire?
|
||||
if (c.getClientSecretExpiresAt() == null) {
|
||||
o.addProperty("client_secret_expires_at", 0); // TODO: do we want to let secrets expire?
|
||||
} else {
|
||||
o.addProperty("expires_at", c.getExpiresAt().getTime() / 1000L);
|
||||
o.addProperty("client_secret_expires_at", c.getClientSecretExpiresAt().getTime() / 1000L);
|
||||
}
|
||||
}
|
||||
|
||||
if (c.getIssuedAt() != null) {
|
||||
o.addProperty("issued_at", c.getIssuedAt().getTime() / 1000L);
|
||||
if (c.getClientIdIssuedAt() != null) {
|
||||
o.addProperty("client_id_issued_at", c.getClientIdIssuedAt().getTime() / 1000L);
|
||||
} else if (c.getCreatedAt() != null) {
|
||||
o.addProperty("issued_at", c.getCreatedAt().getTime() / 1000L);
|
||||
o.addProperty("client_id_issued_at", c.getCreatedAt().getTime() / 1000L);
|
||||
}
|
||||
if (c.getRegistrationAccessToken() != null) {
|
||||
o.addProperty("registration_access_token", c.getRegistrationAccessToken());
|
||||
|
|
Loading…
Reference in New Issue