func (token *OAuth2Token) SignToken() (string, error) {
	token.IssuedAt = time.Now().Unix()
	jwtToken := jwt.NewWithClaims(jwt.SigningMethodHS512, token)
	return jwtToken.SignedString(setting.OAuth2.JWTSecretBytes)
}
// SignToken signs the token with the JWT secret
SignToken signs the token with the JWT secret
// SignToken signs the token with the JWT secret
func (token *OAuth2Token) SignToken() (string, error) {
	token.IssuedAt = time.Now().Unix()
	jwtToken := jwt.NewWithClaims(jwt.SigningMethodHS512, token)
	return jwtToken.SignedString(setting.OAuth2.JWTSecretBytes)
}
func ( token * OAuth2Token ) SignToken ( ) ( string , error ) { token . IssuedAt = time . Now ( ) . Unix ( ) jwtToken := jwt . NewWithClaims ( jwt . SigningMethodHS512 , token ) return jwtToken . SignedString ( setting . OAuth2 . JWTSecretBytes ) }
SignToken signs the token with the JWT secret
SignToken signs the token with the JWT secret