authex v0.1.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 default blacklist
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 if its blacklisted using the default blacklist
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 default blacklist
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
Takes an Authex.Token struct or binary jti and deletes it from the blacklist using the default blacklist.
The default blacklist is set through the :blacklist
config option.
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 provided module.
Returns :ok
if the operation was successful.
Returns :error
if an error occured.
Parameters
- token_or_jti: An Authex.Token struct or binary jti.
Takes an Authex.Token struct or binary jti and checks if its blacklisted using the default blacklist.
The default blacklist is set through the :blacklist
config option.
See get/2 for further details.
Parameters
- token_or_jti: An Authex.Token struct or binary jti.
get(blacklist(), 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 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.
The default blacklist is set through the :blacklist
config option.
See set/2 for further details.
Parameters
- token_or_jti: An Authex.Token struct or binary jti.
set(blacklist(), token_or_jti()) :: :ok | :error
set(blacklist(), 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.Token struct or binary 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.