func (j *JwtTokenizer) Create(username string, points int) (string, error) {
	now := j.TimeFunc()
	expiresAt := now + j.ValidSec
	stdClaims := jwt.StandardClaims{
		Subject:   username,
		NotBefore: now,
		ExpiresAt: expiresAt,
	}
	claims := jwtUserClaims{
		Points:         points,
		StandardClaims: stdClaims,
	}
	token := jwt.NewWithClaims(j.method, claims)
	return token.SignedString(j.key)
}
// Create converts a user to a token string.
Create converts a user to a token string.
// Create converts a user to a token string .
func (j *JwtTokenizer) Create(username string, points int) (string, error) {
	now := j.TimeFunc()
	expiresAt := now + j.ValidSec
	stdClaims := jwt.StandardClaims{
		Subject:   username,
		NotBefore: now,
		ExpiresAt: expiresAt,
	}
	claims := jwtUserClaims{
		Points:         points,
		StandardClaims: stdClaims,
	}
	token := jwt.NewWithClaims(j.method, claims)
	return token.SignedString(j.key)
}
func ( j * JwtTokenizer ) Create ( username string , points int ) ( string , error ) { now := j . TimeFunc ( ) expiresAt := now + j . ValidSec stdClaims := jwt . StandardClaims { Subject : username , NotBefore : now , ExpiresAt : expiresAt , } claims := jwtUserClaims { Points : points , StandardClaims : stdClaims , } token := jwt . NewWithClaims ( j . method , claims ) return token . SignedString ( j . key ) }
Create converts a user to a token string.
Create converts a user to a token string .