View Source DocuSign.OAuth behaviour (DocuSign v1.3.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

access_token()

@type access_token() :: OAuth2.AccessToken.t()

client()

@type client() :: OAuth2.Client.t()

error()

@type error() :: OAuth2.Error.t()

force()

@type force() :: boolean()

headers()

@type headers() :: [{binary(), binary()}]

param()

@type param() :: binary() | %{required(binary()) => param()} | [param()]

params()

@type params() :: %{required(binary()) => param()} | Keyword.t()

Callbacks

client()

@callback client() :: client()

Create new API client

client(t)

@callback client(Keyword.t()) :: client()

get_client_info(client)

@callback get_client_info(client()) :: map() | nil

Returns a map of user information (docusign-specific)

get_token!(client)

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

Retrieve access token and return a client

get_token!(client, params)

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

get_token!(client, params, headers)

@callback get_token!(client(), params(), headers()) :: client() | error()

get_token!(client, params, headers, t)

@callback get_token!(client(), params(), headers(), Keyword.t()) :: client() | error()

interval_refresh_token(client)

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

Retrieve a new time to auto refresh token.

refresh_token!(client)

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

Refresh token

refresh_token!(client, force)

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

token_expired?(arg1)

@callback token_expired?(access_token() | nil | client()) :: boolean()

Check expiration of token return true if token is expired