summaryrefslogtreecommitdiffstats
path: root/api/oauth.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-12-08 07:18:15 -0800
committerHarrison Healey <harrisonmhealey@gmail.com>2016-12-08 10:18:15 -0500
commitc4974374d9840caa6ec496c138a6220dd40afa54 (patch)
treec450cb63b76e032412f3e9c4433bae9518c89513 /api/oauth.go
parent7acd135e021de28bac61e65d5293be8a4f0df328 (diff)
downloadchat-c4974374d9840caa6ec496c138a6220dd40afa54.tar.gz
chat-c4974374d9840caa6ec496c138a6220dd40afa54.tar.bz2
chat-c4974374d9840caa6ec496c138a6220dd40afa54.zip
PLT-4853 Adding cache purging to the server (server) (#4735)
* PLT-4853 Adding caching invalidation to HA * PLT-4853 Adding cach purging to the server
Diffstat (limited to 'api/oauth.go')
-rw-r--r--api/oauth.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/api/oauth.go b/api/oauth.go
index 233ae0879..08c763b61 100644
--- a/api/oauth.go
+++ b/api/oauth.go
@@ -251,8 +251,8 @@ func getAuthorizedApps(c *Context, w http.ResponseWriter, r *http.Request) {
func RevokeAccessToken(token string) *model.AppError {
+ session := GetSession(token)
schan := Srv.Store.Session().Remove(token)
- sessionCache.Remove(token)
if result := <-Srv.Store.OAuth().GetAccessData(token); result.Err != nil {
return model.NewLocAppError("RevokeAccessToken", "api.oauth.revoke_access_token.get.app_error", nil, "")
@@ -268,6 +268,10 @@ func RevokeAccessToken(token string) *model.AppError {
return model.NewLocAppError("RevokeAccessToken", "api.oauth.revoke_access_token.del_session.app_error", nil, "")
}
+ if session != nil {
+ RemoveAllSessionsForUserId(session.UserId)
+ }
+
return nil
}