GITLAB

zhangqijia / Pro2DServer

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Pro2DServer
  • src
  • components
  • jwt
  • jwt_test.go
  • cad2b7f3   reactor: 重构目录, 重构日志, 增加redis组件 Browse Code »
    zhangqijia
    2022-03-01 11:15:10 +0800  
jwt_test.go 304 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package jwt

import (
	"fmt"
	"pro2d/protos/pb"
	"testing"
)

func TestCreateToken(t *testing.T) {
	account := &pb.Account{
		Phone:    "17683852936",
		Password: "123456",
		Uid:      "12312",
	}
	token := CreateToken(account.Uid)
	ac := ParseToken(token)
	fmt.Println("token: ", token, "\nac: ", ac)
}