Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
33087889
Commit
33087889
authored
Mar 12, 2020
by
Robert Czechowski
Browse files
Use GET instead of POST in OAuth user data retrieval
parent
7914aa70
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/webfw_iron.rs
View file @
33087889
...
...
@@ -942,7 +942,7 @@ fn oauth<C>(req: &mut Request) -> IronResult<Response>
let
res
=
client
.post
(
&
access_token_url
)
.basic_auth
(
client_id
,
Some
(
client_secret
))
.form
(
&
params
)
.send
();
let
access
:
OAuthAccess
=
res
.expect
(
"network error"
)
.json
()
.expect
(
"malformed json"
);
let
res
=
client
.
pos
t
(
&
user_data_url
)
.bearer_auth
(
access
.access_token
)
.
form
(
&
params
)
.
send
();
let
res
=
client
.
ge
t
(
&
user_data_url
)
.bearer_auth
(
access
.access_token
)
.send
();
let
mut
user_data
:
OAuthUserData
=
res
.expect
(
"network error"
)
.json
()
.expect
(
"malformed json"
);
if
let
Some
(
id
)
=
user_data
.userID
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment