open token authentication
All checks were successful
Release and Deploy / build (push) Successful in 3m51s
Release and Deploy / deploy (push) Successful in 28s

This commit is contained in:
Fran Jurmanović
2025-08-17 12:15:39 +02:00
parent aab5d2ad61
commit 486c972bba
3 changed files with 15 additions and 5 deletions

View File

@@ -18,7 +18,8 @@ type Claims struct {
}
type JWTHandler struct {
SecretKey []byte
SecretKey []byte
IsOpenToken bool
}
type OpenJWTHandler struct {
@@ -28,6 +29,7 @@ type OpenJWTHandler struct {
// NewJWTHandler creates a new JWTHandler instance with the provided secret key.
func NewOpenJWTHandler(jwtSecret string) *OpenJWTHandler {
jwtHandler := NewJWTHandler(jwtSecret)
jwtHandler.IsOpenToken = true
return &OpenJWTHandler{
JWTHandler: jwtHandler,
}