summaryrefslogtreecommitdiffstats
path: root/store/sql_oauth_store.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-09-14 11:48:48 -0400
committerGitHub <noreply@github.com>2017-09-14 11:48:48 -0400
commited1363e1bf0d4a99ab6f990595b60cd891825561 (patch)
treefbdb81e73945ea8611323cbb929a9be0eb731e3f /store/sql_oauth_store.go
parent23e64ec9aa2fd245a7e3b2faf5973433d8080c03 (diff)
downloadchat-ed1363e1bf0d4a99ab6f990595b60cd891825561.tar.gz
chat-ed1363e1bf0d4a99ab6f990595b60cd891825561.tar.bz2
chat-ed1363e1bf0d4a99ab6f990595b60cd891825561.zip
Fix update SQL query to include refresh token (#7425)
Diffstat (limited to 'store/sql_oauth_store.go')
-rw-r--r--store/sql_oauth_store.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_oauth_store.go b/store/sql_oauth_store.go
index 067e1d090..0a5f14dc4 100644
--- a/store/sql_oauth_store.go
+++ b/store/sql_oauth_store.go
@@ -396,8 +396,8 @@ func (as SqlOAuthStore) UpdateAccessData(accessData *model.AccessData) StoreChan
return
}
- if _, err := as.GetMaster().Exec("UPDATE OAuthAccessData SET Token = :Token, ExpiresAt = :ExpiresAt WHERE ClientId = :ClientId AND UserID = :UserId",
- map[string]interface{}{"Token": accessData.Token, "ExpiresAt": accessData.ExpiresAt, "ClientId": accessData.ClientId, "UserId": accessData.UserId}); err != nil {
+ if _, err := as.GetMaster().Exec("UPDATE OAuthAccessData SET Token = :Token, ExpiresAt = :ExpiresAt, RefreshToken = :RefreshToken WHERE ClientId = :ClientId AND UserID = :UserId",
+ map[string]interface{}{"Token": accessData.Token, "ExpiresAt": accessData.ExpiresAt, "RefreshToken": accessData.RefreshToken, "ClientId": accessData.ClientId, "UserId": accessData.UserId}); err != nil {
result.Err = model.NewLocAppError("SqlOAuthStore.Update", "store.sql_oauth.update_access_data.app_error", nil,
"clientId="+accessData.ClientId+",userId="+accessData.UserId+", "+err.Error())
} else {