Paul 6 lat temu
rodzic
commit
1638f2025a

+ 2
- 1
middleware/auth/auth.go Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 }