View Source Oidcc.Plug.Cache behaviour (Oidcc Plug v0.1.1)
Behaviour to cache introspection / userinfo requests
usage
Usage
- Userinfo: See
Oidcc.Plug.LoadUserinfo.opts/0
/cache
- Introspection: See
Oidcc.Plug.IntrospectToken.opts/0
/cache
Link to this section Summary
Callbacks
Check cache if userinfo / introspection is stored for token
.
Store userinfo / introspection for token
.
Link to this section Types
@type t() :: module()
Link to this section Callbacks
@callback get(type :: :userinfo, token :: String.t(), conn :: Plug.Conn.t()) :: {:ok, :oidcc_jwt_util.claims()} | :miss
@callback get(type :: :introspection, token :: String.t(), conn :: Plug.Conn.t()) :: {:ok, Oidcc.TokenIntrospection.t()} | :miss
Check cache if userinfo / introspection is stored for token
.
@callback put( type :: :userinfo, token :: String.t(), data :: :oidcc_jwt_util.claims(), conn :: Plug.Conn.t() ) :: :ok
@callback put( type :: :introspection, token :: String.t(), data :: Oidcc.TokenIntrospection.t(), conn :: Plug.Conn.t() ) :: :ok
Store userinfo / introspection for token
.