authex v0.1.1 Authex.Blacklist behaviour View Source
Link to this section Summary
Functions
Takes an Authex.Token struct or binary jti and deletes it from the blacklist using the default blacklist. See del/2 for further details
Takes an Authex.Token struct or binary jti and deletes it from the blacklist
using the default blacklist. Returns :ok
if the action was successful.
Otherwise, :error
Takes an Authex.Token struct or binary jti and checks whether it has been blacklisted or not using the default blacklist. See get/2 for further details
Takes an Authex.Token struct or binary jti and checks whether it has been
blacklisted or not using the provided blacklist. Returns false
if the jti
is not blacklisted. Returns true
if it has been blacklisted. Otherwise,
returns :error
Takes an Authex.Token struct or binary jti and sets it as being blacklisted using the default blacklist. See set/2 for further details
Takes an Authex.Token struct or binary jti and sets it as being blacklisted
using the default blacklist. Returns :ok
if the action was successful.
Otherwise, :error
Link to this section Types
Link to this section Functions
del(Authex.Token.t() | binary()) :: :ok | :error
Takes an Authex.Token struct or binary jti and deletes it from the blacklist using the default blacklist. See del/2 for further details.
Parameters
- token_or_jti: An Authex.Token struct or binary jti.
Takes an Authex.Token struct or binary jti and deletes it from the blacklist
using the default blacklist. Returns :ok
if the action was successful.
Otherwise, :error
.
Parameters
- token_or_jti: An Authex.Token struct or binary jti.
get(Authex.Token.t() | binary()) :: :ok | :error
Takes an Authex.Token struct or binary jti and checks whether it has been blacklisted or not using the default blacklist. See get/2 for further details.
Parameters
- token_or_jti: An Authex.Token struct or binary jti.
get(blacklist(), Authex.Token.t() | binary()) :: boolean() | :error
Takes an Authex.Token struct or binary jti and checks whether it has been
blacklisted or not using the provided blacklist. Returns false
if the jti
is not blacklisted. Returns true
if it has been blacklisted. Otherwise,
returns :error
.
Parameters
- blacklist: A blacklist module.
- token_or_jti: An Authex.Token struct or binary jti.
Takes an Authex.Token struct or binary jti and sets it as being blacklisted using the default blacklist. See set/2 for further details.
Parameters
- token_or_jti: An Authex.Token struct or binary jti.
set(blacklist(), Authex.Token.t() | binary()) :: :ok | :error
set(blacklist(), Authex.Token.t() | binary()) :: :ok | :error
Takes an Authex.Token struct or binary jti and sets it as being blacklisted
using the default blacklist. Returns :ok
if the action was successful.
Otherwise, :error
.
Parameters
- blacklist: A blacklist module.
- token_or_jti: An Authex.Token struct or binary jti.