0x4a52466c696e74 2 months ago
parent
commit
b1b0a949dc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rest_http/rest.go

+ 1 - 1
rest_http/rest.go

@@ -76,7 +76,7 @@ func (s *Rest) handle(w http.ResponseWriter, r *http.Request) {
 		if parts := strings.Split(authHeader, " "); len(parts) == 2 && parts[0] == "Bearer" {
 			tokenString := parts[1]
 			auth, err := s.server.TokenParse(tokenString)
-			if err != nil {
+			if err == nil {
 				rr.auth = auth
 			}
 		}