Class AccountBuilder

    • Method Detail

      • addContact

        public AccountBuilder addContact​(URI contact)
        Add a contact URI to the list of contacts.
        Parameters:
        contact - Contact URI
        Returns:
        itself
      • addEmail

        public AccountBuilder addEmail​(String email)
        Add a email address to the list of contacts.

        This is a convenience call for addContact(String) that doesn't require from you attach "mailto" scheme before email address.

        Parameters:
        email - Contact email without "mailto" scheme (e.g. test@gmail.com)
        Returns:
        itself
        Throws:
        IllegalArgumentException - if there is a syntax error in the URI string
      • onlyExisting

        public AccountBuilder onlyExisting()
        Signals that only an existing account should be returned. The server will not create a new account if the key is not known. This is useful if you only have your account's key pair available, but not your account's location URL.
        Returns:
        itself
      • withKeyIdentifier

        public AccountBuilder withKeyIdentifier​(String kid,
                                                SecretKey macKey)
        Sets a Key Identifier and MAC key provided by the CA. Use this if your CA requires an individual account identification, e.g. your customer number.
        Parameters:
        kid - Key Identifier
        macKey - MAC key
        Returns:
        itself
      • withKeyIdentifier

        public AccountBuilder withKeyIdentifier​(String kid,
                                                String encodedMacKey)
        Sets a Key Identifier and MAC key provided by the CA. Use this if your CA requires an individual account identification, e.g. your customer number.
        Parameters:
        kid - Key Identifier
        encodedMacKey - Base64url encoded MAC key. It will be decoded for your convenience.
        Returns:
        itself