mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Declare ejabberd_oauth behaviour
This commit is contained in:
parent
35d19b32f4
commit
be50d57ddd
@ -63,6 +63,10 @@
|
||||
|
||||
-include("ejabberd_commands.hrl").
|
||||
|
||||
-callback init() -> any().
|
||||
-callback store(#oauth_token{}) -> ok | {error, any()}.
|
||||
-callback lookup(binary()) -> {ok, #oauth_token{}} | error.
|
||||
-callback clean(non_neg_integer()) -> any().
|
||||
|
||||
%% There are two ways to obtain an oauth token:
|
||||
%% * Using the web form/api results in the token being generated in behalf of the user providing the user/pass
|
||||
|
@ -25,6 +25,7 @@
|
||||
%%%-------------------------------------------------------------------
|
||||
|
||||
-module(ejabberd_oauth_mnesia).
|
||||
-behaviour(ejabberd_oauth).
|
||||
|
||||
-export([init/0,
|
||||
store/1,
|
||||
|
@ -25,7 +25,7 @@
|
||||
%%%-------------------------------------------------------------------
|
||||
|
||||
-module(ejabberd_oauth_rest).
|
||||
|
||||
-behaviour(ejabberd_oauth).
|
||||
-behaviour(ejabberd_config).
|
||||
|
||||
-export([init/0,
|
||||
|
@ -25,7 +25,7 @@
|
||||
%%%-------------------------------------------------------------------
|
||||
|
||||
-module(ejabberd_oauth_sql).
|
||||
|
||||
-behaviour(ejabberd_oauth).
|
||||
-compile([{parse_transform, ejabberd_sql_pt}]).
|
||||
|
||||
-export([init/0,
|
||||
|
Loading…
Reference in New Issue
Block a user