mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Update a number of dependencies (incl. CVE fixes) (#4107)
* Update a number of dependencies (incl. CVE fixes) Includes some dependencies that were upgraded in #4106 as well as a few more dependencies. Some deps that have been upgraded had CVEs. Notably, upgrades deprecated dependencies such as: - `github.com/go-chi/chi` (replaced with `/v5`) - `github.com/gofrs/uuid` (replaced with `/v5`) - `github.com/hashicorp/golang-lru` (replaced with `/v2` which uses generics) * Upgraded a few more deps * lint * reverted yaml library to v2 * remove unnecessary mod replace * Update chromedp Fixes #3733
This commit is contained in:
@@ -14,15 +14,15 @@ const APIKeySubject = "APIKey"
|
||||
|
||||
type APIKeyClaims struct {
|
||||
UserID string `json:"uid"`
|
||||
jwt.StandardClaims
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
func GenerateAPIKey(userID string) (string, error) {
|
||||
claims := &APIKeyClaims{
|
||||
UserID: userID,
|
||||
StandardClaims: jwt.StandardClaims{
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
Subject: APIKeySubject,
|
||||
IssuedAt: time.Now().Unix(),
|
||||
IssuedAt: jwt.NewNumericDate(time.Now()),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user