Paul 6 år sedan
förälder
incheckning
1638f2025a
3 ändrade filer med 6 tillägg och 3 borttagningar
  1. 2
    1
      middleware/auth/auth.go
  2. 2
    1
      middleware/auth/optional_auth.go
  3. 2
    1
      middleware/auth/session_redis.go

+ 2
- 1
middleware/auth/auth.go Visa fil

@@ -2,9 +2,10 @@ package auth
2 2
 
3 3
 import (
4 4
 	"fmt"
5
+	"net/http"
6
+
5 7
 	"github.com/dgrijalva/jwt-go"
6 8
 	"github.com/gin-gonic/gin"
7
-	"net/http"
8 9
 )
9 10
 
10 11
 const (

+ 2
- 1
middleware/auth/optional_auth.go Visa fil

@@ -2,9 +2,10 @@ package auth
2 2
 
3 3
 import (
4 4
 	"fmt"
5
+	"net/http"
6
+
5 7
 	"github.com/dgrijalva/jwt-go"
6 8
 	"github.com/gin-gonic/gin"
7
-	"net/http"
8 9
 )
9 10
 
10 11
 func OptionalAuth(authKey string) gin.HandlerFunc {

+ 2
- 1
middleware/auth/session_redis.go Visa fil

@@ -1,8 +1,9 @@
1 1
 package auth
2 2
 
3 3
 import (
4
-	"github.com/go-redis/redis"
5 4
 	"time"
5
+
6
+	"github.com/go-redis/redis"
6 7
 )
7 8
 
8 9
 type RedisSessionStore struct{ client *redis.Client }