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">>,
|
||||
[{<<"action">>, <<"authorization_token">>},
|
||||
{<<"method">>, <<"post">>}],
|
||||
[?LABEL(<<"username">>, [?CT(<<"User">>), ?C(<<": ">>)]),
|
||||
[?LABEL(<<"username">>, [?CT(<<"User (jid)">>), ?C(<<": ">>)]),
|
||||
?INPUTID(<<"text">>, <<"username">>, <<"">>),
|
||||
?BR,
|
||||
?LABEL(<<"server">>, [?CT(<<"Server">>), ?C(<<": ">>)]),
|
||||
?INPUTID(<<"text">>, <<"server">>, <<"">>),
|
||||
?BR,
|
||||
?LABEL(<<"password">>, [?CT(<<"Password">>), ?C(<<": ">>)]),
|
||||
?INPUTID(<<"password">>, <<"password">>, <<"">>),
|
||||
?INPUT(<<"hidden">>, <<"response_type">>, ResponseType),
|
||||
|
@ -443,8 +440,8 @@ process(_Handlers,
|
|||
ClientId = proplists:get_value(<<"client_id">>, Q, <<"">>),
|
||||
RedirectURI = proplists:get_value(<<"redirect_uri">>, Q, <<"">>),
|
||||
SScope = proplists:get_value(<<"scope">>, Q, <<"">>),
|
||||
Username = proplists:get_value(<<"username">>, Q, <<"">>),
|
||||
Server = proplists:get_value(<<"server">>, Q, <<"">>),
|
||||
StringJID = proplists:get_value(<<"username">>, Q, <<"">>),
|
||||
#jid{user = Username, server = Server} = jid:from_string(StringJID),
|
||||
Password = proplists:get_value(<<"password">>, Q, <<"">>),
|
||||
State = proplists:get_value(<<"state">>, Q, <<"">>),
|
||||
Scope = str:tokens(SScope, <<" ">>),
|
||||
|
|
Loading…
Reference in New Issue