feat jenkins cicd

This commit is contained in:
2025-12-31 23:34:44 +08:00
parent 670140e7d3
commit 01621ec237
32 changed files with 505 additions and 92 deletions

View File

@@ -25,6 +25,9 @@ func GenToken(usn int64, secret string, expires time.Duration) (string, error) {
}
func ParseToken(tokenString string, secret string) (*Claims, error) {
if tokenString == "" {
return nil, errors.New("invalid token")
}
claims := &Claims{}
token, err := jwt.ParseWithClaims(tokenString, claims, func(_ *jwt.Token) (interface{}, error) {
return []byte(secret), nil