Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Update context when updating account #286

Open
jwillmer opened this issue Apr 7, 2022 · 0 comments
Open

Improvement: Update context when updating account #286

jwillmer opened this issue Apr 7, 2022 · 0 comments

Comments

@jwillmer
Copy link

jwillmer commented Apr 7, 2022

I noticed that my context does not reflect the changes when I update my account details (email). I think it would be good if the context applies the changes so that I do not need to recreate it.

  ..
  await UpdateAccount(server, accountKey);
  return new AcmeContext(server, accountKey);
}  

/// <summary>
/// Update account to agree to terms in case they changed.
/// </summary>
/// <remarks>Context is not returned since it needs to be recreated in order to reflect the changes.</remarks>
/// <param name="server">Server URL</param>
/// <param name="accountKey">Certificate Key</param>
/// <returns></returns>
private async Task UpdateAccount(Uri server, IKey accountKey)
{
    var acme = new AcmeContext(server, accountKey);
    var account = await acme.Account();
    await account.Update(new[] { $"mailto:info@{DomainName}" }, true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant