mirror of https://github.com/shred/acme4j
Use String for expiry date, as Date would require joda-time
parent
04fe570811
commit
2d5261f592
|
@ -16,7 +16,6 @@ package org.shredzone.acme4j;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.shredzone.acme4j.challenge.Challenge;
|
import org.shredzone.acme4j.challenge.Challenge;
|
||||||
|
@ -30,7 +29,7 @@ public class Authorization {
|
||||||
|
|
||||||
private String domain;
|
private String domain;
|
||||||
private String status;
|
private String status;
|
||||||
private Date expires;
|
private String expires;
|
||||||
private List<Challenge> challenges;
|
private List<Challenge> challenges;
|
||||||
private List<List<Challenge>> combinations;
|
private List<List<Challenge>> combinations;
|
||||||
|
|
||||||
|
@ -65,14 +64,14 @@ public class Authorization {
|
||||||
/**
|
/**
|
||||||
* Gets the expiry date of the authorization, if set by the server.
|
* Gets the expiry date of the authorization, if set by the server.
|
||||||
*/
|
*/
|
||||||
public Date getExpires() {
|
public String getExpires() {
|
||||||
return expires;
|
return expires;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the expiry date of the authorization.
|
* Sets the expiry date of the authorization.
|
||||||
*/
|
*/
|
||||||
public void setExpires(Date expires) {
|
public void setExpires(String expires) {
|
||||||
this.expires = expires;
|
this.expires = expires;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
package org.shredzone.acme4j.challenge;
|
package org.shredzone.acme4j.challenge;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.shredzone.acme4j.Account;
|
import org.shredzone.acme4j.Account;
|
||||||
|
@ -52,7 +51,7 @@ public interface Challenge {
|
||||||
/**
|
/**
|
||||||
* Returns the validation date, if returned by the server.
|
* 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
|
* Authorizes a {@link Challenge} by signing it with an {@link Account}. This is
|
||||||
|
|
|
@ -19,7 +19,6 @@ import java.net.URISyntaxException;
|
||||||
import java.security.Key;
|
import java.security.Key;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -73,7 +72,7 @@ public class GenericChallenge implements Challenge {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Date getValidated() {
|
public String getValidated() {
|
||||||
return get(KEY_VALIDATED);
|
return get(KEY_VALIDATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue