public Account(Jwk jwk, IEnumerable <string>?contacts, DateTimeOffset?tosAccepted) { AccountId = GuidString.NewValue(); Jwk = jwk; Contacts = contacts?.ToList(); TOSAccepted = tosAccepted; }
public Order(string accountId, IEnumerable <Identifier> identifiers) { OrderId = GuidString.NewValue(); Status = OrderStatus.Pending; AccountId = accountId; Identifiers = new List <Identifier>(identifiers); Authorizations = new List <Authorization>(); }
public Authorization(Order order, Identifier identifier, DateTimeOffset expires) { AuthorizationId = GuidString.NewValue(); Challenges = new List <Challenge>(); Order = order ?? throw new ArgumentNullException(nameof(order)); Order.Authorizations.Add(this); Identifier = identifier ?? throw new ArgumentNullException(nameof(identifier)); Expires = expires; }
public Challenge(Authorization authorization, string type) { if (!ChallengeTypes.AllTypes.Contains(type)) { throw new InvalidOperationException($"Unknown ChallengeType {type}"); } ChallengeId = GuidString.NewValue(); Type = type; Token = CryptoString.NewValue(); Authorization = authorization; Authorization.Challenges.Add(this); }