View Source Oidcc.Token.Access (Oidcc v3.2.0)

Access Token struct.

See :oidcc_token.access/0

Summary

Functions

Generate a map of authorization headers to use when using the given Oidcc.Token.Access struct to access an API endpoint.

Types

@type t() :: %Oidcc.Token.Access{
  expires: pos_integer() | :undefined,
  token: String.t(),
  type: String.t()
}

Functions

Link to this function

authorization_headers(access_token, method, endpoint, client_context, opts \\ %{})

View Source (since 3.2.0)
@spec authorization_headers(
  access_token :: t(),
  method :: :get | :post,
  endpoint :: String.t(),
  client_context :: Oidcc.ClientContext.t(),
  opts :: :oidcc_token.authorization_headers_opts()
) :: %{required(String.t()) => String.t()}

Generate a map of authorization headers to use when using the given Oidcc.Token.Access struct to access an API endpoint.