AcmeClient class

The ACME Client

Constructors

AcmeClient(String baseUrl, String privateKeyPem, String publicKeyPem, bool acceptTerms, List<String> contacts, {bool createIfNotExists = true})
  • baseUrl = The base url of the acme server
  • privateKeyPem = The private key in PEM format. If none given, it will look within the basePath for a private key
  • publicKeyPem = The public key in PEM format. If none given, it will look within the basePath for a public key
  • acceptTerms = Accept terms and condition while creating / fetching an account
  • contacts = A list of email addresses
  • createIfNotExists = Defines whether to create an account if none exists
  • Properties

    acceptTerms bool
    Boolean value to define whether to accept the terms of condition or not
    getter/setter pair
    account Account?
    The account information fetched from the ACME server
    getter/setter pair
    baseUrl String
    The base url of the ACME server
    getter/setter pair
    contacts List<String>
    The list of contacts
    getter/setter pair
    createIfNotExists bool
    Boolean value that defines if a new account should be created if none found for the given public key
    getter/setter pair
    directories AcmeDirectories?
    The ACME directories fetched from the server
    getter/setter pair
    hashCode int
    The hash code for this object.
    no setterinherited
    nonce String?
    The latest nonce received from the ACME server
    getter/setter pair
    privateKeyPem String
    The private key as a PEM
    getter/setter pair
    publicKeyPem String
    The public key as a PEM
    getter/setter pair
    runtimeType Type
    A representation of the runtime type of the object.
    no setterinherited

    Methods

    createAccount() Future<Account?>
    Creates a new account for publicKeyPem by sending a POST request to the new account url.
    finalizeOrder(Order order, String csr, {int retries = 5}) Future<Order?>
    Will finalize the order by sending a POST request to the order's finalize url including the given csr in the payload. The given csr will be transformed in the necessary base64url encoding.
    getAccount({bool createIfnotExists = true}) Future<Account?>
    Fetches the account information for publicKeyPem.
    getAuthorization(Order order) Future<List<Authorization>?>
    Fetches a list of Authorization for the given order
    getCertificate(Order order) Future<List<String>?>
    Fetches the certificate with the complete chain from the ACME server.
    init() Future<void>
    Will initate the ACME client.
    isReady(Order order) Future<bool>
    Will check the status of the order to be 'ready' by sending a POST-AS-GET request to the order url.
    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    order(Order order) Future<Order?>
    Starts a new order
    orderInfo(Order order) Future<Order?>
    Fetch order info
    orderList() Future<List<String>?>
    Fetches a list of current running orders
    selfDNSTest(DnsDcvData data, {int maxAttempts = 15}) Future<bool>
    A test whether the DNS record is placed or not. Uses the Google DNS JSON API to check the corresponding zone file.
    selfHttpTest(HttpDcvData data, {int maxAttempts = 15}) Future<bool>
    A test whether the HTTP token is placed or not. Uses a simple HTTP GET request to check for the corresponding file on the server.
    toString() String
    A string representation of this object.
    inherited
    validate(Challenge challenge, {int maxAttempts = 15}) Future<bool>
    Triggers the validation for the given challenge
    validateData() → void
    Validates the client data. Throws an ArgumentError if values are missing or incorrect.

    Operators

    operator ==(Object other) bool
    The equality operator.
    inherited