mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-27 14:30:55 +02:00
oauth: single jid field instead of username/password fields
This commit is contained in:
parent
c5d9d35e7b
commit
caf7b54305
@ -375,12 +375,9 @@ process(_Handlers,
|
|||||||
?XAE(<<"form">>,
|
?XAE(<<"form">>,
|
||||||
[{<<"action">>, <<"authorization_token">>},
|
[{<<"action">>, <<"authorization_token">>},
|
||||||
{<<"method">>, <<"post">>}],
|
{<<"method">>, <<"post">>}],
|
||||||
[?LABEL(<<"username">>, [?CT(<<"User">>), ?C(<<": ">>)]),
|
[?LABEL(<<"username">>, [?CT(<<"User (jid)">>), ?C(<<": ">>)]),
|
||||||
?INPUTID(<<"text">>, <<"username">>, <<"">>),
|
?INPUTID(<<"text">>, <<"username">>, <<"">>),
|
||||||
?BR,
|
?BR,
|
||||||
?LABEL(<<"server">>, [?CT(<<"Server">>), ?C(<<": ">>)]),
|
|
||||||
?INPUTID(<<"text">>, <<"server">>, <<"">>),
|
|
||||||
?BR,
|
|
||||||
?LABEL(<<"password">>, [?CT(<<"Password">>), ?C(<<": ">>)]),
|
?LABEL(<<"password">>, [?CT(<<"Password">>), ?C(<<": ">>)]),
|
||||||
?INPUTID(<<"password">>, <<"password">>, <<"">>),
|
?INPUTID(<<"password">>, <<"password">>, <<"">>),
|
||||||
?INPUT(<<"hidden">>, <<"response_type">>, ResponseType),
|
?INPUT(<<"hidden">>, <<"response_type">>, ResponseType),
|
||||||
@ -443,8 +440,8 @@ process(_Handlers,
|
|||||||
ClientId = proplists:get_value(<<"client_id">>, Q, <<"">>),
|
ClientId = proplists:get_value(<<"client_id">>, Q, <<"">>),
|
||||||
RedirectURI = proplists:get_value(<<"redirect_uri">>, Q, <<"">>),
|
RedirectURI = proplists:get_value(<<"redirect_uri">>, Q, <<"">>),
|
||||||
SScope = proplists:get_value(<<"scope">>, Q, <<"">>),
|
SScope = proplists:get_value(<<"scope">>, Q, <<"">>),
|
||||||
Username = proplists:get_value(<<"username">>, Q, <<"">>),
|
StringJID = proplists:get_value(<<"username">>, Q, <<"">>),
|
||||||
Server = proplists:get_value(<<"server">>, Q, <<"">>),
|
#jid{user = Username, server = Server} = jid:from_string(StringJID),
|
||||||
Password = proplists:get_value(<<"password">>, Q, <<"">>),
|
Password = proplists:get_value(<<"password">>, Q, <<"">>),
|
||||||
State = proplists:get_value(<<"state">>, Q, <<"">>),
|
State = proplists:get_value(<<"state">>, Q, <<"">>),
|
||||||
Scope = str:tokens(SScope, <<" ">>),
|
Scope = str:tokens(SScope, <<" ">>),
|
||||||
|
Loading…
Reference in New Issue
Block a user