mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-20 22:07:15 +00:00
chore: move auth to apiv1
This commit is contained in:
parent
05bc21b660
commit
d866d5b53b
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/boojack/shortify/server/auth"
|
||||
"github.com/boojack/shortify/api/v1/auth"
|
||||
"github.com/boojack/shortify/store"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
|
@ -33,11 +33,9 @@ const (
|
||||
// 2. The access token has already expired, we refresh the token so that the ongoing request can pass through.
|
||||
CookieExpDuration = refreshTokenDuration - 1*time.Minute
|
||||
// AccessTokenCookieName is the cookie name of access token.
|
||||
AccessTokenCookieName = "access-token"
|
||||
AccessTokenCookieName = "shortify.access-token"
|
||||
// RefreshTokenCookieName is the cookie name of refresh token.
|
||||
RefreshTokenCookieName = "refresh-token"
|
||||
// UserIDCookieName is the cookie name of user ID.
|
||||
UserIDCookieName = "user"
|
||||
RefreshTokenCookieName = "shortify.refresh-token"
|
||||
)
|
||||
|
||||
type claimsMessage struct {
|
@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/boojack/shortify/api/v1/auth"
|
||||
"github.com/boojack/shortify/internal/util"
|
||||
"github.com/boojack/shortify/server/auth"
|
||||
"github.com/boojack/shortify/store"
|
||||
"github.com/golang-jwt/jwt/v4"
|
||||
"github.com/labstack/echo/v4"
|
||||
|
Loading…
x
Reference in New Issue
Block a user