Skip to content

Commit

Permalink
#189 : avoid ambiguoty
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyz committed Apr 5, 2016
1 parent 78edcb7 commit 2591250
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Client/src/main/java/org/xdi/oxauth/client/RegisterRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ public Map<String, String> getParameters() {
parameters.put(SCOPES.toString(), toJSONArray(scopes).toString());
}
if (clientSecretExpiresAt != null) {
parameters.put(CLIENT_SECRET_EXPIRES_AT.toString(), Long.toString(clientSecretExpiresAt.getTime()));
parameters.put(CLIENT_SECRET_EXPIRES_AT_.toString(), Long.toString(clientSecretExpiresAt.getTime()));
}
// Federation params
if (!StringUtils.isBlank(federationUrl)) {
Expand Down Expand Up @@ -1087,9 +1087,9 @@ public static RegisterRequest fromJson(String p_json) throws JSONException {
}

Date clientSecretExpiresAt = null;
if (requestObject.has(CLIENT_SECRET_EXPIRES_AT.getName())) {
if (requestObject.optLong(CLIENT_SECRET_EXPIRES_AT.getName()) > 0) {
clientSecretExpiresAt = new Date(requestObject.optLong(CLIENT_SECRET_EXPIRES_AT.getName()));
if (requestObject.has(CLIENT_SECRET_EXPIRES_AT_.getName())) {
if (requestObject.optLong(CLIENT_SECRET_EXPIRES_AT_.getName()) > 0) {
clientSecretExpiresAt = new Date(requestObject.optLong(CLIENT_SECRET_EXPIRES_AT_.getName()));
}
}

Expand Down Expand Up @@ -1263,7 +1263,7 @@ public JSONObject getJSONParameters() throws JSONException {
parameters.put(FEDERATION_METADATA_ID.toString(), federationId);
}
if (clientSecretExpiresAt != null) {
parameters.put(CLIENT_SECRET_EXPIRES_AT.toString(), clientSecretExpiresAt.getTime());
parameters.put(CLIENT_SECRET_EXPIRES_AT_.toString(), clientSecretExpiresAt.getTime());
}
// Custom params
if (customAttributes != null && !customAttributes.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public enum RegisterRequestParam {

SCOPES("scopes"),

CLIENT_SECRET_EXPIRES_AT("client_secret_expires_at"),
CLIENT_SECRET_EXPIRES_AT_("client_secret_expires_at"),

// Federation Params
FEDERATION_METADATA_URL("federation_metadata_url"),
Expand Down

0 comments on commit 2591250

Please sign in to comment.