tariffs/internal/models/jwt.go

19 lines
330 B
Go
Raw Permalink Normal View History

2024-07-25 10:51:27 +00:00
package models
import (
"github.com/golang-jwt/jwt/v5"
"time"
)
type JWTConfiguration struct {
PrivateKey string
PublicKey string
Issuer string
Audience string
Algorithm jwt.SigningMethodRSA
ExpiresIn time.Duration
}
const AuthJWTDecodedUserIDKey = "userID"
const AuthJWTDecodedAccessTokenKey = "access-token"