You shouldn't be authorized always

Signed-off-by: Peter Stuifzand <peter@stuifzand.eu>
This commit is contained in:
Peter Stuifzand 2018-09-15 16:00:57 +02:00
parent b3fe5c17ed
commit 3c9f7eae47
Signed by: peter
GPG Key ID: 374322D56E5209E8
2 changed files with 1 additions and 2 deletions

View File

@ -53,8 +53,6 @@ func (b *memoryBackend) cachedCheckAuthToken(conn redis.Conn, header string, r *
} }
authorized := b.checkAuthToken(header, r) authorized := b.checkAuthToken(header, r)
authorized = true
if authorized { if authorized {
fmt.Printf("Token response: %#v\n", r) fmt.Printf("Token response: %#v\n", r)
_, err = conn.Do("HMSET", redis.Args{}.Add(key).AddFlat(r)...) _, err = conn.Do("HMSET", redis.Args{}.Add(key).AddFlat(r)...)

View File

@ -1,5 +1,6 @@
package auth package auth
// Auther
type Auther interface { type Auther interface {
AuthTokenAccepted(header string, r *TokenResponse) bool AuthTokenAccepted(header string, r *TokenResponse) bool
} }