View Source Lightning.AuthProviders.Store (Lightning v2.10.4)

Store module for caching Handlers.

Since Handlers often have to fetch their .well-known files when being initialized we cache these in order to avoid repeatedly making HTTP requests to a providers API.

Summary

Types

@type finder() ::
  (name :: String.t() ->
     {:ok, Lightning.AuthProviders.Handler.t()} | {:error, term()})

Functions

Link to this function

get_handler(name, finder \\ &default/1)

View Source
@spec get_handler(key :: String.t(), default :: finder()) ::
  {:ok, Lightning.AuthProviders.Handler.t()} | {:error, :not_found}
@spec get_handlers() :: {:ok, [Lightning.AuthProviders.Handler.t()]}
Link to this function

put_handler(name, handler)

View Source
@spec put_handler(
  name :: String.t(),
  handler :: Lightning.AuthProviders.Handler.t()
) :: {:ok, Lightning.AuthProviders.Handler.t()}
@spec remove_handler(name :: String.t()) :: {:ok, true}