authex v0.1.6 Authex.Banlist behaviour View Source
Link to this section Summary
Functions
Takes an Authex.Token struct or binary or integer sub and deletes it from the banlist using the default banlist
Takes an Authex.Token struct or binary or integer sub and deletes it from the banlist using the provided module
Takes an Authex.Token struct or binary or integer sub and checks if its banned using the default banlist
Takes an Authex.Token struct or binary or integer sub and checks whether it has been banned using the provided module
Takes an Authex.Token struct or binary or integer sub and sets it as being banlisted using the default banlist
Takes an Authex.Token struct or binary or integer sub and sets it as being banlisted using the provided module
Callbacks
Removes the provided binary or integer sub from the banlist
Checks whether the banlist contains the provided binary or integer sub
Puts the provided binary sub into the banlist
Link to this section Types
token_or_sub() :: Authex.Token.t() | binary() | integer()
Link to this section Functions
Takes an Authex.Token struct or binary or integer 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 or integer sub.
Takes an Authex.Token struct or binary or integer 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 or integer sub.
Takes an Authex.Token struct or binary or integer 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 or integer sub.
get(banlist(), token_or_sub()) :: boolean() | :error
Takes an Authex.Token struct or binary or integer 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 or integer sub.
Takes an Authex.Token struct or binary or integer 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 or integer sub.
Link to this section Callbacks
Removes the provided binary or integer sub from the banlist.
Returning :ok signals the operation was successful.
Returning :error signals an error occured.
Parameters
- sub: A binary or integer sub.
Checks whether the banlist contains the provided binary or integer 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 or integer sub.