View Source Gamora.Cache.Introspect (gamora v0.13.0)
This module that allows to get, set and fetch introspection data in the cache in order to improve performance.
Link to this section 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.
Link to this section Functions
Deletes introspect cache for the given access token.
parameters
Parameters
- access_token: String [Access token from IDP].
examples
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
Parameters
- access_token: String [Access token from IDP].
examples
Examples
iex> fetch("ACCESS_TOKEN")
{:ok, %{"active" => true, ...}}
Returns introspect data for the given access token.
parameters
Parameters
- access_token: String [Access token from IDP].
examples
Examples
iex> get("ACCESS_TOKEN")
{:ok, nil}
iex> get("ACCESS_TOKEN")
{:ok, %{"active" => true, ...}}
Stores introspect data for the given access token.
parameters
Parameters
- access_token: String [Access token from IDP].
examples
Examples
iex> put("ACCESS_TOKEN", %{"active" => true, ...})
{:ok, %{"active" => true, ...}}