24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-16 22:05:29 +02:00

Declare ejabberd_oauth behaviour

This commit is contained in:
Evgeniy Khramtsov 2017-05-21 11:31:30 +03:00
parent 35d19b32f4
commit be50d57ddd
4 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -25,6 +25,7 @@
%%%-------------------------------------------------------------------
-module(ejabberd_oauth_mnesia).
-behaviour(ejabberd_oauth).
-export([init/0,
store/1,

View File

@ -25,7 +25,7 @@
%%%-------------------------------------------------------------------
-module(ejabberd_oauth_rest).
-behaviour(ejabberd_oauth).
-behaviour(ejabberd_config).
-export([init/0,

View File

@ -25,7 +25,7 @@
%%%-------------------------------------------------------------------
-module(ejabberd_oauth_sql).
-behaviour(ejabberd_oauth).
-compile([{parse_transform, ejabberd_sql_pt}]).
-export([init/0,