Gamora.Cache.Introspect (gamora v0.15.0)
View SourceThis module that allows to get, set and fetch introspection data in the cache in order to improve performance.
Summary
Functions
Deletes introspect cache for the given access token.
Returns introspect data for the given access token if exists, otherwise it will fetch it and store it.
Returns introspect data for the given access token.
Stores introspect data for the given access token.
Functions
Deletes introspect cache for the given access token.
Parameters
- access_token: String [Access token from IDP].
Examples
iex> del("ACCESS_TOKEN")
{:ok, true}
Returns introspect data for the given access token if exists, otherwise it will fetch it and store it.
Parameters
- access_token: String [Access token from IDP].
Examples
iex> fetch("ACCESS_TOKEN")
{:ok, %{"active" => true, ...}}
Returns introspect data for the given access token.
Parameters
- access_token: String [Access token from IDP].
Examples
iex> get("ACCESS_TOKEN")
{:ok, nil}
iex> get("ACCESS_TOKEN")
{:ok, %{"active" => true, ...}}
Stores introspect data for the given access token.
Parameters
- access_token: String [Access token from IDP].
Examples
iex> put("ACCESS_TOKEN", %{"active" => true, ...})
{:ok, %{"active" => true, ...}}