Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
99e632c4
Unverified
Commit
99e632c4
authored
Aug 21, 2017
by
Jan Dageförde
Browse files
MDL-59889 oauth2: Remove check for storing new refresh token
parent
d8e9a23c
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/classes/oauth2/client.php
View file @
99e632c4
...
...
@@ -215,15 +215,9 @@ class client extends \oauth2_client {
$this
->
store_token
(
$accesstoken
);
if
(
isset
(
$r
->
refresh_token
))
{
$userinfo
=
$this
->
get_userinfo
();
if
(
$userinfo
[
'email'
]
==
$systemaccount
->
get
(
'email'
))
{
$systemaccount
->
set
(
'refreshtoken'
,
$r
->
refresh_token
);
$systemaccount
->
update
();
$this
->
refreshtoken
=
$r
->
refresh_token
;
}
else
{
throw
new
moodle_exception
(
'Attempt to store refresh token for non-system user.'
);
}
$systemaccount
->
set
(
'refreshtoken'
,
$r
->
refresh_token
);
$systemaccount
->
update
();
$this
->
refreshtoken
=
$r
->
refresh_token
;
}
return
true
;
...
...
Write
Preview
Supports
Markdown
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