MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / TokenLogin

Method TokenLogin

client/client.go:22–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20)
21
22func (c *QQClient) TokenLogin() (*LoginResponse, error) {
23 if c.Online.Load() {
24 return nil, ErrAlreadyOnline
25 }
26 data, err := buildNtloginRequest(c.Uin, c.Version(), c.Device(), &c.transport.Sig, c.transport.Sig.TempPwd)
27 if err != nil {
28 return nil, err
29 }
30 packet, err := c.sendUniPacketAndWait(
31 "trpc.login.ecdh.EcdhService.SsoNTLoginEasyLogin",
32 data,
33 )
34 if err != nil {
35 return nil, err
36 }
37 res, err := parseNtloginResponse(packet, &c.transport.Sig)
38 if err != nil {
39 return nil, err
40 }
41 if res.Success {
42 err = c.init()
43 }
44 return &res, err
45}
46
47func (c *QQClient) Relogin() (*LoginResponse, error) {
48 if !c.Online.Load() {

Callers 1

ReloginMethod · 0.95

Calls 6

VersionMethod · 0.95
DeviceMethod · 0.95
sendUniPacketAndWaitMethod · 0.95
initMethod · 0.95
buildNtloginRequestFunction · 0.85
parseNtloginResponseFunction · 0.85

Tested by

no test coverage detected