Use String for expiry date, as Date would require joda-time

pull/17/merge
Richard Körber 2015-12-13 19:21:35 +01:00
parent 04fe570811
commit 2d5261f592
3 changed files with 5 additions and 8 deletions

View File

@ -16,7 +16,6 @@ package org.shredzone.acme4j;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import org.shredzone.acme4j.challenge.Challenge;
@ -30,7 +29,7 @@ public class Authorization {
private String domain;
private String status;
private Date expires;
private String expires;
private List<Challenge> challenges;
private List<List<Challenge>> combinations;
@ -65,14 +64,14 @@ public class Authorization {
/**
* Gets the expiry date of the authorization, if set by the server.
*/
public Date getExpires() {
public String getExpires() {
return expires;
}
/**
* Sets the expiry date of the authorization.
*/
public void setExpires(Date expires) {
public void setExpires(String expires) {
this.expires = expires;
}

View File

@ -14,7 +14,6 @@
package org.shredzone.acme4j.challenge;
import java.net.URI;
import java.util.Date;
import java.util.Map;
import org.shredzone.acme4j.Account;
@ -52,7 +51,7 @@ public interface Challenge {
/**
* Returns the validation date, if returned by the server.
*/
Date getValidated();
String getValidated();
/**
* Authorizes a {@link Challenge} by signing it with an {@link Account}. This is

View File

@ -19,7 +19,6 @@ import java.net.URISyntaxException;
import java.security.Key;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@ -73,7 +72,7 @@ public class GenericChallenge implements Challenge {
}
@Override
public Date getValidated() {
public String getValidated() {
return get(KEY_VALIDATED);
}