Exemple #1
0
        public Account(Jwk jwk, IEnumerable <string>?contacts, DateTimeOffset?tosAccepted)
        {
            AccountId = GuidString.NewValue();

            Jwk         = jwk;
            Contacts    = contacts?.ToList();
            TOSAccepted = tosAccepted;
        }
Exemple #2
0
        public Order(string accountId, IEnumerable <Identifier> identifiers)
        {
            OrderId = GuidString.NewValue();
            Status  = OrderStatus.Pending;

            AccountId = accountId;

            Identifiers    = new List <Identifier>(identifiers);
            Authorizations = new List <Authorization>();
        }
Exemple #3
0
        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;
        }
Exemple #4
0
        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);
        }