public void RefreshAuthorizeChallenge(AuthorizationState authzState, string type, bool useRootUrl = false)
{
AssertInit();
AssertRegistration();
var c = authzState.Challenges.FirstOrDefault(x => x.Type == type);
if (c == null)
throw new ArgumentOutOfRangeException(nameof(type), "no challenge found matching requested type")
.With(nameof(type), type);
var requUri = new Uri(c.Uri);
if (useRootUrl)
requUri = new Uri(RootUrl, requUri.PathAndQuery);
var resp = RequestHttpGet(requUri);
var cp = JsonConvert.DeserializeObject<ChallengePart>(resp.ContentAsString);
c.Type = cp.Type;
c.Uri = cp.Uri;
c.Token = cp.Token;
c.Status = cp.Status;
}