Pristine.OAuth2.Provider (Pristine v0.4.0)

Copy Markdown View Source

Normalized OAuth2 provider configuration.

Summary

Types

t()

@type t() :: %Pristine.OAuth2.Provider{
  authorize_url: String.t() | nil,
  client_auth_method: :basic | :request_body | :none,
  default_scopes: [String.t()],
  flow: :authorization_code | :client_credentials | :password | :refresh_token,
  introspection_url: String.t() | nil,
  metadata: map(),
  name: String.t() | nil,
  revocation_url: String.t() | nil,
  scopes: map(),
  site: String.t() | nil,
  token_content_type: String.t(),
  token_method: :get | :post,
  token_url: String.t() | nil
}

Functions

from_security_scheme(scheme_name, scheme, opts \\ [])

@spec from_security_scheme(String.t() | atom(), map(), keyword()) ::
  {:ok, t()} | {:error, Pristine.OAuth2.Error.t()}

from_security_scheme!(scheme_name, scheme, opts \\ [])

@spec from_security_scheme!(String.t() | atom(), map(), keyword()) :: t()

new(opts \\ [])

@spec new(keyword()) :: t()