mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-27 14:30:55 +02:00
Declare ejabberd_oauth behaviour
This commit is contained in:
parent
35d19b32f4
commit
be50d57ddd
@ -63,6 +63,10 @@
|
|||||||
|
|
||||||
-include("ejabberd_commands.hrl").
|
-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:
|
%% 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
|
%% * 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).
|
-module(ejabberd_oauth_mnesia).
|
||||||
|
-behaviour(ejabberd_oauth).
|
||||||
|
|
||||||
-export([init/0,
|
-export([init/0,
|
||||||
store/1,
|
store/1,
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
%%%-------------------------------------------------------------------
|
%%%-------------------------------------------------------------------
|
||||||
|
|
||||||
-module(ejabberd_oauth_rest).
|
-module(ejabberd_oauth_rest).
|
||||||
|
-behaviour(ejabberd_oauth).
|
||||||
-behaviour(ejabberd_config).
|
-behaviour(ejabberd_config).
|
||||||
|
|
||||||
-export([init/0,
|
-export([init/0,
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
%%%-------------------------------------------------------------------
|
%%%-------------------------------------------------------------------
|
||||||
|
|
||||||
-module(ejabberd_oauth_sql).
|
-module(ejabberd_oauth_sql).
|
||||||
|
-behaviour(ejabberd_oauth).
|
||||||
-compile([{parse_transform, ejabberd_sql_pt}]).
|
-compile([{parse_transform, ejabberd_sql_pt}]).
|
||||||
|
|
||||||
-export([init/0,
|
-export([init/0,
|
||||||
|
Loading…
Reference in New Issue
Block a user