cleaned
This commit is contained in:
+14
-1
@@ -1,6 +1,10 @@
|
||||
package models
|
||||
|
||||
import "github.com/golang-jwt/jwt/v5"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
)
|
||||
|
||||
type AuthorizationRequest struct {
|
||||
UserID string `json:"user_id"`
|
||||
@@ -19,3 +23,12 @@ type Claims struct {
|
||||
Role string `json:"role"`
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
// ContextKey is a custom type for context keys to avoid collisions
|
||||
type ContextKey string
|
||||
|
||||
// CacheEntry represents a token cache entry
|
||||
type CacheEntry struct {
|
||||
Claims *Claims
|
||||
ExpiresAt time.Time
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user