u
This commit is contained in:
1 parent
91ae4cb474
commit
b116690769
14 files changed
+669
-56
No files matched your search
@@ -3,8 +3,9 @@ package jwt
|
||||
import (
|
||||
"base-go-v2/internal/config"
|
||||
"errors"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"time"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -29,6 +30,7 @@ func CreateToken(orgID, userID string) (string, error) {
|
||||
}
|
||||
|
||||
expiry := config.App.JWT.Expiry
|
||||
|
||||
switch {
|
||||
case expiry > 0:
|
||||
expireAt := time.Now().Add(expiry)
|
||||
|
||||
Reference in new issue
Block a user