authex v0.1.4 Authex.Banlist behaviour View Source
Link to this section Summary
Functions
Takes an Authex.Token struct or binary sub and deletes it from the banlist using the default banlist
Takes an Authex.Token struct or binary sub and deletes it from the banlist using the provided module
Takes an Authex.Token struct or binary sub and checks if its banned using the default banlist
Takes an Authex.Token struct or binary sub and checks whether it has been banned using the provided module
Takes an Authex.Token struct or binary sub and sets it as being banlisted using the default banlist
Takes an Authex.Token struct or binary sub and sets it as being banlisted using the provided module
Callbacks
Removes the provided binary sub from the banlist
Checks whether the banlist contains the provided binary sub
Puts the provided binary sub into the banlist
Link to this section Types
Link to this section Functions
Takes an Authex.Token struct or binary sub and deletes it from the banlist using the default banlist.
The default banlist is set through the :banlist config option.
See del/2 for further details.
Parameters
- token_or_sub: An Authex.Token struct or binary sub.
Takes an Authex.Token struct or binary sub and deletes it from the banlist using the provided module.
Returns :ok if the operation was successful.
Returns :error if an error occured.
Parameters
- token_or_sub: An Authex.Token struct or binary sub.
Takes an Authex.Token struct or binary sub and checks if its banned using the default banlist.
The default banlist is set through the :banlist config option.
See get/2 for further details.
Parameters
- token_or_sub: An Authex.Token struct or binary sub.
get(banlist(), token_or_sub()) :: boolean() | :error
Takes an Authex.Token struct or binary sub and checks whether it has been banned using the provided module.
Returns false if the sub is not banned.
Returns true if the sub is banned.
Otherwise, returns :error.
Parameters
- banlist: A banlist module.
- token_or_sub: An Authex.Token struct or binary sub.
Takes an Authex.Token struct or binary sub and sets it as being banlisted using the default banlist.
The default banlist is set through the :banlist config option.
See set/2 for further details.
Parameters
- token_or_sub: An Authex.Token struct or binary sub.
set(banlist(), token_or_sub()) :: :ok | :error
set(banlist(), token_or_sub()) :: :ok | :error
Takes an Authex.Token struct or binary sub and sets it as being banlisted using the provided module.
Returns :ok if the operation was successful.
Returns :error if an error occured.
Parameters
- banlist: A banlist module.
- token_or_sub: An Authex.Token struct or binary sub.
Link to this section Callbacks
Removes the provided binary sub from the banlist.
Returning :ok signals the operation was successful.
Returning :error signals an error occured.
Parameters
- sub: A binary sub.
Checks whether the banlist contains the provided binary sub.
Returning true signals that the sub is banned.
Returning false signals that the sub is not banned.
Returning :error signals an error occured.
Parameters
- sub: A binary sub.