Commit Graph

26 Commits

Author SHA1 Message Date
Badlop 8af85d913f Erlang R17 has a Time limit in erlang:send_after (#1246) 2016-08-16 18:32:06 +02:00
Paweł Chmielowski 50596dc4d3 Provide proper args_desc in oauth_issue_token command 2016-08-10 11:26:04 +02:00
Alexey Shchepin 111aa83f5e Add tokens cache to ejabberd_oauth 2016-08-04 01:59:28 +03:00
Mickaël Rémond 2ef58a33a9 Merge pull request #1223 from processone/expand_api
More API fixes and improvements
2016-08-01 15:36:47 +02:00
Mickael Remond 674a8039ef
Add support for sending back missing scope error to API ReST command calls 2016-07-30 18:51:54 +02:00
Christophe Romain a080322055 Switch workers from temporary to transient 2016-07-29 11:18:42 +02:00
Mickaël Rémond 7a74a4836a Merge pull request #1211 from processone/expand_api
There is still work to do, be we reached a stable state and can merge up to this point.
2016-07-28 14:57:48 +02:00
Mickael Remond 7781f39b74
Clarify command module API 2016-07-26 12:15:03 +02:00
Alexey Shchepin 839490b0d9 Add DB backend support for ejabberd_oauth 2016-07-25 20:08:30 +03:00
Mickael Remond b4a430541d
Return more user friendly, human readable error description 2016-07-24 14:10:12 +02:00
Mickael Remond bfa61eaa46
Make default OAuth token TTL values more user friendly 2016-07-23 18:57:57 +02:00
Pablo Polvorin 4332dddbc4 Support oauth password grant type
As in https://tools.ietf.org/html/rfc6749#section-4.3
2016-07-22 19:17:12 -03:00
Pablo Polvorin caf7b54305 oauth: single jid field instead of username/password fields 2016-07-22 15:37:48 -03:00
Pablo Polvorin cbfab687e8 Oauth callback must pass expires_in as ttl instead of epoch 2016-07-20 14:47:11 -03:00
Pablo Polvorin 1d317e8068 Let user choose the desired oauth token TTL 2016-07-19 20:18:07 -03:00
Pablo Polvorin 483ef09263 Fix command argument formatting 2016-07-19 00:51:04 -03:00
Pablo Polvorin 33e0283f0d Add 'ejabberd:user' and 'ejabberd:admin' oauth scopes
'ejabberd:user' includes all commands defined with policy "user".
'ejabberd:admin' includes commands defined with policy "admin".
2016-07-19 00:24:06 -03:00
Pablo Polvorin 673a654c47 Fix ce0d1704c6
Original request was to allow ejabberd sysadmin to generate
tokens for specific users.  JIDs must not be passed as argument
when requesting the tokens.
2016-07-18 20:25:23 -03:00
Pablo Polvorin ce0d1704c6 Allow generation of oauth tokens from command line
Oauth tokens can be generated for commands (scopes) having admin|user|open
policy. Restricted commands are not available as those are only usable
from ejabberdctl command line.

Four new commands are available:

$ejabberdctl oauth_issue_token "stats;get_roster"
    Generates a token authorized to call both stats and get_roster
    commands.  Note scopes must be separated by semicolon.

$ejabberdctl oauth_list_tokens
    List tokens generated from the command line, with their scope
    and expirity time.

$ejabberdctl oauth_list_scopes
    List scopes available

$ejabberdctl oauth_revoke_token "Lbs7qdJfdKXOWzVrArgyckY055tE1xnt"
    Revokes the given token
2016-06-29 00:22:28 -03:00
Paweł Chmielowski 3a8da27d86 Use {access,shaper}_rules_validator in other places where access rules are used 2016-06-21 13:18:24 +02:00
Evgeniy Khramtsov 46568fb959 Merge commit 'refs/pull/524/head' of github.com:processone/ejabberd into sasl-api-change 2016-03-25 18:16:50 +03:00
Mickael Remond 0b1620a45c Remove compile warnings 2016-02-08 10:50:28 +01:00
Badlop f448ff608a Update copyright to 2016 (#901) 2016-01-13 12:29:14 +01:00
Evgeniy Khramtsov 95265dd3ad Move JID related functions to jid.erl (#847) 2015-11-24 18:44:13 +03:00
Alexey Shchepin 88a206400a Add oauth_access option 2015-09-25 19:48:53 +03:00
Christophe Romain a1129dc96b Add OAuth support (thanks to Aleksey) 2015-09-25 15:49:07 +02:00