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
@spec get_handler(key :: String.t(), default :: finder()) :: {:ok, Lightning.AuthProviders.Handler.t()} | {:error, :not_found}
@spec get_handlers() :: {:ok, [Lightning.AuthProviders.Handler.t()]}
@spec put_handler( name :: String.t(), handler :: Lightning.AuthProviders.Handler.t() ) :: {:ok, Lightning.AuthProviders.Handler.t()}
@spec remove_handler(name :: String.t()) :: {:ok, true}