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