This commit is contained in:
awei
2025-03-03 17:43:50 +08:00
commit 113756eaae
1497 changed files with 127997 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package token
import (
"errors"
)
var (
TokenNotFoundErr = errors.New("token not found")
ExpiredErr = errors.New("token is expired")
NotValidYetErr = errors.New("token not active yet")
MalformedErr = errors.New("that's not even a token")
InvalidErr = errors.New("couldn't handle this token")
)
const (
userTokenHeader = "Authorization"
userTokenParam = "_user_token"
expireSeconds = 3600
issuer = "bbs-go"
secret = ""
)