View Source DocuSign.OAuth behaviour (DocuSign v1.2.0)

This module defines the behaviour of the OAuth adapter.

Summary

Callbacks

Create new API client

Returns a map of user information (docusign-specific)

Retrieve access token and return a client

Retrieve a new time to auto refresh token.

Refresh token

Check expiration of token return true if token is expired

Types

@type access_token() :: OAuth2.AccessToken.t()
@type client() :: OAuth2.Client.t()
@type error() :: OAuth2.Error.t()
@type force() :: boolean()
@type headers() :: [{binary(), binary()}]
@type param() :: binary() | %{required(binary()) => param()} | [param()]
@type params() :: %{required(binary()) => param()} | Keyword.t()

Callbacks

@callback client() :: client()

Create new API client

@callback client(Keyword.t()) :: client()
@callback get_client_info(client()) :: map() | nil

Returns a map of user information (docusign-specific)

@callback get_token!(client()) :: client() | error()

Retrieve access token and return a client

Link to this callback

get_token!(client, params)

View Source
@callback get_token!(client(), params()) :: client() | error()
Link to this callback

get_token!(client, params, headers)

View Source
@callback get_token!(client(), params(), headers()) :: client() | error()
Link to this callback

get_token!(client, params, headers, t)

View Source
@callback get_token!(client(), params(), headers(), Keyword.t()) :: client() | error()
Link to this callback

interval_refresh_token(client)

View Source
@callback interval_refresh_token(client()) :: integer()

Retrieve a new time to auto refresh token.

@callback refresh_token!(client()) :: client()

Refresh token

Link to this callback

refresh_token!(client, force)

View Source
@callback refresh_token!(client(), force()) :: client()
@callback token_expired?(access_token() | nil | client()) :: boolean()

Check expiration of token return true if token is expired