View Source Assent.Strategy.OIDC.Base behaviour (Assent v0.2.3)

OIDC OAuth 2.0 strategy base.



defmodule MyApp.MyOIDCStrategy do
  use Assent.Strategy.OIDC.Base

  def default_config(_config) do
      site: ""

  def normalize(_config, user), do: {:ok, user}

Link to this section Summary

Link to this section Callbacks

@callback default_config(Keyword.t()) :: Keyword.t()
@callback fetch_user(Keyword.t(), map()) :: {:ok, map()} | {:error, term()}
@callback normalize(Keyword.t(), map()) ::
  {:ok, map()} | {:ok, map(), map()} | {:error, term()}

Link to this section Functions

Link to this function

authorize_url(config, strategy)

View Source
@spec authorize_url(Keyword.t(), module()) ::
     session_params: %{state: binary()} | %{state: binary(), nonce: binary()},
     url: binary()
  | {:error, term()}
Link to this function

callback(config, params, strategy)

View Source
@spec callback(Keyword.t(), map(), module()) ::
  {:ok, %{user: map(), token: map()}} | {:error, term()}