mirror of https://github.com/shred/acme4j
Remove Authorization scope
parent
1fcaef53c7
commit
1eedc755ea
|
@ -43,7 +43,6 @@ public class Authorization extends AcmeResource {
|
||||||
private String domain;
|
private String domain;
|
||||||
private Status status;
|
private Status status;
|
||||||
private Instant expires;
|
private Instant expires;
|
||||||
private Order scope;
|
|
||||||
private List<Challenge> challenges;
|
private List<Challenge> challenges;
|
||||||
private boolean loaded = false;
|
private boolean loaded = false;
|
||||||
|
|
||||||
|
@ -90,15 +89,6 @@ public class Authorization extends AcmeResource {
|
||||||
return expires;
|
return expires;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the scope of the {@link Authorization}. If not {@code null}, this
|
|
||||||
* {@link Authorization} is only valid for the returned {@link Order}.
|
|
||||||
*/
|
|
||||||
public Order getScope() {
|
|
||||||
load();
|
|
||||||
return scope;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a list of all challenges offered by the server.
|
* Gets a list of all challenges offered by the server.
|
||||||
*/
|
*/
|
||||||
|
@ -204,11 +194,6 @@ public class Authorization extends AcmeResource {
|
||||||
domain = jsonIdentifier.get("value").asString();
|
domain = jsonIdentifier.get("value").asString();
|
||||||
}
|
}
|
||||||
|
|
||||||
URL scopeUrl = json.get("scope").asURL();
|
|
||||||
if (scopeUrl != null) {
|
|
||||||
scope = Order.bind(getSession(), scopeUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
challenges = fetchChallenges(json);
|
challenges = fetchChallenges(json);
|
||||||
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
|
|
|
@ -126,7 +126,6 @@ public class AuthorizationTest {
|
||||||
assertThat(auth.getStatus(), is(Status.VALID));
|
assertThat(auth.getStatus(), is(Status.VALID));
|
||||||
assertThat(auth.getExpires(), is(parseTimestamp("2016-01-02T17:12:40Z")));
|
assertThat(auth.getExpires(), is(parseTimestamp("2016-01-02T17:12:40Z")));
|
||||||
assertThat(auth.getLocation(), is(locationUrl));
|
assertThat(auth.getLocation(), is(locationUrl));
|
||||||
assertThat(auth.getScope().getLocation(), is(url("https://example.com/order/123")));
|
|
||||||
|
|
||||||
assertThat(auth.getChallenges(), containsInAnyOrder(
|
assertThat(auth.getChallenges(), containsInAnyOrder(
|
||||||
(Challenge) httpChallenge, (Challenge) dnsChallenge));
|
(Challenge) httpChallenge, (Challenge) dnsChallenge));
|
||||||
|
|
|
@ -18,6 +18,5 @@
|
||||||
"url": "https://example.com/authz/asdf/1",
|
"url": "https://example.com/authz/asdf/1",
|
||||||
"token": "DGyRejmCefe7v4NfDGDKfA"
|
"token": "DGyRejmCefe7v4NfDGDKfA"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"scope": "https://example.com/order/123"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue