libp2p/autotls/broker

Search:
Group by:
Source   Edit  

Types

AutotlsBroker = ref object
Source   Edit  

Consts

DefaultBrokerURL = "registration.libp2p.direct"
Source   Edit  

Procs

proc close(self: AutotlsBroker): InternalRaisesFuture[void, (CancelledError,)] {.
    ...stackTrace: false, raises: [], gcsafe, raises: [], tags: [RootEffect],
    forbids: [].}
Source   Edit  
proc new(T: typedesc[AutotlsBroker]; rng: Rng;
         brokerURL: string = DefaultBrokerURL;
         peerIdAuthClient: PeerIDAuthClient = PeerIDAuthClient.new(rng)): T:type {.
    ...raises: [].}
Source   Edit  
proc sendChallenge(self: AutotlsBroker; peerInfo: PeerInfo;
                   addrs: seq[MultiAddress]; keyAuth: KeyAuthorization): InternalRaisesFuture[
    void, (AutoTLSError, PeerIDAuthError, CancelledError)] {....stackTrace: false,
    raises: [], gcsafe, raises: [], tags: [RootEffect], forbids: [].}
Authenticates with the AutoTLS broker and registers the ACME DNS-01 challenge for the given addresses. All request construction, the broker URL, bearer-token handling and response validation are kept internal: the caller only learns whether the challenge was accepted (no error) or not (an exception). Source   Edit