DocuSign.ClientRegistry (DocuSign v2.2.0)

View Source

GenServer to store API clients and automatically refresh JWT access tokens.

The registry keeps track of API clients using the user ID (which is the API Username in the user's profile on DocuSign).

Summary

Functions

Returns a specification to start this module under a supervisor.

Get API Client

Async refreshes a token.

Callback implementation for GenServer.init/1.

Types

oauth_error()

@type oauth_error() :: OAuth2.Response.t() | OAuth2.Error.t()

user_id()

@type user_id() :: String.t()

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

client(user_id)

@spec client(user_id()) :: {:ok, OAuth2.Client.t()} | {:error, oauth_error()}

Get API Client

handle_info(msg, state)

Async refreshes a token.

init(opts)

Callback implementation for GenServer.init/1.

start_link(opts \\ [])