GITLAB

zhangqijia / Pro2DServer

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Pro2DServer
  • utils
  • jwt_test.go
  • ee23102d   支持mongo, grpc接服务器 Browse Code »
    zhangqijia
    2022-02-15 16:51:38 +0800  
jwt_test.go 326 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package utils

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

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