Browse Source

auth: invalidate every token in disabling auth

Hitoshi Mitake 9 years ago
parent
commit
66107b8653
1 changed files with 4 additions and 0 deletions
  1. 4 0
      auth/store.go

+ 4 - 0
auth/store.go

@@ -184,6 +184,10 @@ func (as *authStore) AuthDisable() {
 	as.enabled = false
 	as.enabledMu.Unlock()
 
+	as.simpleTokensMu.Lock()
+	as.simpleTokens = make(map[string]string) // invalidate all tokens
+	as.simpleTokensMu.Unlock()
+
 	plog.Noticef("Authentication disabled")
 }