authex v0.2.2 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 provided module
Takes an Authex.Token struct or binary jti and checks whether it has been
blacklisted using the provided module
Takes an Authex.Token struct or binary jti and sets it as being blacklisted
using the provided module
Callbacks
Removes the provided binary jti from the blacklist
Checks whether the blacklist contains the provided binary jti
Puts the provided binary jti into the blacklist
Link to this section Types
Link to this section Functions
del(blacklist :: Authex.Blacklist.t(), token_or_jti()) :: :ok | :error
Takes an Authex.Token struct or binary jti and deletes it from the blacklist
using the provided module.
Returns :ok if the operation was successful.
Returns :error if an error occured.
Parameters
- blacklist: A blacklist module.
- token_or_jti: An Authex.Token struct or binary or integer jti.
get(blacklist :: Authex.Blacklist.t(), token_or_jti()) :: boolean() | :error
Takes an Authex.Token struct or binary jti and checks whether it has been
blacklisted using the provided module.
Returns false if the jti is not blacklisted.
Returns true if the jti is blacklisted.
Otherwise, returns :error.
Parameters
- blacklist: A blacklist module.
- token_or_jti: An
Authex.Tokenstruct or binary or integer jti.
set(blacklist :: Authex.Blacklist.t(), token_or_jti()) :: :ok | :error
Takes an Authex.Token struct or binary jti and sets it as being blacklisted
using the provided module.
Returns :ok if the operation was successful.
Returns :error if an error occured.
Parameters
- blacklist: A blacklist module.
- token_or_jti: An
Authex.Tokenstruct or binary or integer jti.
Link to this section Callbacks
Removes the provided binary jti from the blacklist.
Returning :ok signals the operation was successful.
Returning :error signals an error occured.
Parameters
- jti: A binary jti.
Checks whether the blacklist contains the provided binary jti.
Returning true signals that the jti is blacklisted.
Returning false signals that the jti is not blacklisted.
Returning :error signals an error occured.
Parameters
- jti: A binary jti.