mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 02:37:24 +08:00
fix: avoid using background context
This commit is contained in:
@@ -15,13 +15,15 @@
|
||||
package tokens
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"yunion.io/x/log"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/httperrors"
|
||||
"yunion.io/x/onecloud/pkg/mcclient"
|
||||
)
|
||||
|
||||
func FernetTokenVerifier(tokenStr string) (mcclient.TokenCredential, error) {
|
||||
func FernetTokenVerifier(ctx context.Context, tokenStr string) (mcclient.TokenCredential, error) {
|
||||
token := SAuthToken{}
|
||||
err := token.ParseFernetToken(tokenStr)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user