ExAcme.Challenge (ExAcme v0.5.1)

View Source

Represents an ACME Challenge object.

Provides functionalities to handle challenges required for validation.

Attributes

  • url - The URL of the challenge.
  • status - The current status of the challenge.
  • type - The type of challenge (e.g., "dns-01").
  • token - The challenge token.
  • validated - Datetime when the challenge was validated.
  • error - Any error associated with the challenge.

Summary

Types

t()

ACME Challenge Object

Functions

Finds a challenge of a specific type within an authorization.

Generates the key authorization string for a challenge.

Types

t()

@type t() :: %ExAcme.Challenge{
  error: map() | nil,
  status: String.t(),
  token: String.t() | nil,
  type: String.t(),
  url: String.t(),
  validated: DateTime.t() | nil
}

ACME Challenge Object

Functions

find_by_type(authorization, type)

@spec find_by_type(ExAcme.Authorization.t(), String.t()) :: t() | nil

Finds a challenge of a specific type within an authorization.

Parameters

  • authorization - The authorization object.
  • type - The type of challenge to find (e.g., "dns-01").

Returns

  • The challenge object if found, else nil.

key_authorization(token, account_key)

@spec key_authorization(String.t(), ExAcme.AccountKey.t()) :: String.t()

Generates the key authorization string for a challenge.

Parameters

  • token - The challenge token.
  • account_key - The account key.

Returns

  • The key authorization string.