From 66107b865303186b1c44429355ffa82fd55f34c4 Mon Sep 17 00:00:00 2001 From: Hitoshi Mitake Date: Wed, 22 Jun 2016 15:43:43 +0900 Subject: [PATCH] auth: invalidate every token in disabling auth --- auth/store.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/auth/store.go b/auth/store.go index a98ec5d6a..4ba76db0b 100644 --- a/auth/store.go +++ b/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") }