mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
refactor(deps): use foundation shared utilities
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/ez-api/ez-api/internal/util"
|
||||
"github.com/ez-api/foundation/tokenhash"
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ type TokenInfo struct {
|
||||
// ValidateToken checks a child key against Redis for validity.
|
||||
// This is designed to be called by the data plane (balancer).
|
||||
func (s *TokenService) ValidateToken(ctx context.Context, token string) (*TokenInfo, error) {
|
||||
tokenHash := util.HashToken(token)
|
||||
tokenHash := tokenhash.HashToken(token)
|
||||
tokenKey := fmt.Sprintf("auth:token:%s", tokenHash)
|
||||
|
||||
// 1. Get token metadata from Redis
|
||||
|
||||
Reference in New Issue
Block a user