auth_test.go
1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package service
import (
"fmt"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
"testing"
)
func TestAdminToken(t *testing.T) {
domain.JWTExpiresSecond = 3600 * 24 * 365
userAuth := &domain.UserAuth{
UserId: 3325567738895360,
CompanyId: 507,
Phone: "18559023318",
PlatformId: 28,
Name: "庄敏学",
AdminType: 2,
}
fmt.Println(userAuth.CreateAccessToken())
}
func TestFontToken(t *testing.T) {
domain.JWTExpiresSecond = 3600 * 24 * 365
userAuth := &domain.UserAuth{
UserId: 3325567738895360,
CompanyId: 507,
Phone: "18559023318",
PlatformId: 29,
Name: "庄敏学",
AdminType: 2,
}
fmt.Println(userAuth.CreateAccessToken())
}
func TestOtherAccountToken(t *testing.T) {
domain.JWTExpiresSecond = 3600 * 24 * 365
userAuth := &domain.UserAuth{
UserId: 3422174102828544,
CompanyId: 8,
Phone: "17708397664",
PlatformId: 28,
Name: "杨欢",
AdminType: 1,
}
tk, _ := userAuth.CreateAccessToken()
t.Log(tk)
//fmt.Println(userAuth.CreateAccessToken())
}