# `DocuSign.OAuth`
[🔗](https://github.com/neilberkman/docusign_elixir/blob/v3.4.0/lib/docusign/oauth.ex#L1)

This module defines the behaviour of the OAuth adapter.

# `access_token`

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

# `client`

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

# `error`

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

# `force`

```elixir
@type force() :: boolean()
```

# `headers`

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

# `param`

```elixir
@type param() :: binary() | %{required(binary()) =&gt; param()} | [param()]
```

# `params`

```elixir
@type params() :: %{required(binary()) =&gt; param()} | Keyword.t()
```

# `client`

```elixir
@callback client() :: client()
```

Create new API client

# `client`

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

# `get_client_info`

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

Returns a map of user information (docusign-specific)

# `get_token!`

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

Retrieve access token and return a client

# `get_token!`

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

# `get_token!`

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

# `get_token!`

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

# `interval_refresh_token`

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

Retrieve a new time to auto refresh token.

# `refresh_token!`

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

Refresh token

# `refresh_token!`

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

# `token_expired?`

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

Check expiration of token
return true if token is expired

---

*Consult [api-reference.md](api-reference.md) for complete listing*
