Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
151fe240
Commit
151fe240
authored
Jun 12, 2019
by
Maxim Ivanov
Committed by
Carl Bergquist
Jun 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OAuth: Fix for wrong user token updated on OAuth refresh in DS proxy (#17541)
parent
599514ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
pkg/api/pluginproxy/ds_proxy.go
+1
-1
pkg/services/sqlstore/user_auth.go
+2
-2
No files found.
pkg/api/pluginproxy/ds_proxy.go
View file @
151fe240
...
@@ -354,7 +354,7 @@ func addOAuthPassThruAuth(c *m.ReqContext, req *http.Request) {
...
@@ -354,7 +354,7 @@ func addOAuthPassThruAuth(c *m.ReqContext, req *http.Request) {
// If the tokens are not the same, update the entry in the DB
// If the tokens are not the same, update the entry in the DB
if
token
.
AccessToken
!=
authInfoQuery
.
Result
.
OAuthAccessToken
{
if
token
.
AccessToken
!=
authInfoQuery
.
Result
.
OAuthAccessToken
{
updateAuthCommand
:=
&
m
.
UpdateAuthInfoCommand
{
updateAuthCommand
:=
&
m
.
UpdateAuthInfoCommand
{
UserId
:
authInfoQuery
.
Result
.
Id
,
UserId
:
authInfoQuery
.
Result
.
User
Id
,
AuthModule
:
authInfoQuery
.
Result
.
AuthModule
,
AuthModule
:
authInfoQuery
.
Result
.
AuthModule
,
AuthId
:
authInfoQuery
.
Result
.
AuthId
,
AuthId
:
authInfoQuery
.
Result
.
AuthId
,
OAuthToken
:
token
,
OAuthToken
:
token
,
...
...
pkg/services/sqlstore/user_auth.go
View file @
151fe240
...
@@ -241,8 +241,8 @@ func UpdateAuthInfo(cmd *models.UpdateAuthInfoCommand) error {
...
@@ -241,8 +241,8 @@ func UpdateAuthInfo(cmd *models.UpdateAuthInfoCommand) error {
UserId
:
cmd
.
UserId
,
UserId
:
cmd
.
UserId
,
AuthModule
:
cmd
.
AuthModule
,
AuthModule
:
cmd
.
AuthModule
,
}
}
upd
,
err
:=
sess
.
Update
(
authUser
,
cond
)
_
,
err
:=
sess
.
Update
(
authUser
,
con
d
)
sqlog
.
Debug
(
"Updated user_auth"
,
"user_id"
,
cmd
.
UserId
,
"auth_module"
,
cmd
.
AuthModule
,
"rows"
,
up
d
)
return
err
return
err
})
})
}
}
...
...
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