From 3c9f7eae476e118e9d97aa47756cccd65d2bf7e1 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Sat, 15 Sep 2018 16:00:57 +0200 Subject: [PATCH] You shouldn't be authorized always Signed-off-by: Peter Stuifzand --- cmd/eksterd/auth.go | 2 -- pkg/auth/types.go | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/eksterd/auth.go b/cmd/eksterd/auth.go index 848ace6..829f3d4 100644 --- a/cmd/eksterd/auth.go +++ b/cmd/eksterd/auth.go @@ -53,8 +53,6 @@ func (b *memoryBackend) cachedCheckAuthToken(conn redis.Conn, header string, r * } authorized := b.checkAuthToken(header, r) - authorized = true - if authorized { fmt.Printf("Token response: %#v\n", r) _, err = conn.Do("HMSET", redis.Args{}.Add(key).AddFlat(r)...) diff --git a/pkg/auth/types.go b/pkg/auth/types.go index 20aee69..d5707d0 100644 --- a/pkg/auth/types.go +++ b/pkg/auth/types.go @@ -1,5 +1,6 @@ package auth +// Auther type Auther interface { AuthTokenAccepted(header string, r *TokenResponse) bool }