panlogin

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginHelper

type LoginHelper struct {
	// contains filtered or unexported fields
}

func NewLoginHelper

func NewLoginHelper(webHost string) *LoginHelper

func (*LoginHelper) GetQRCodeLoginResult

func (h *LoginHelper) GetQRCodeLoginResult(tokenId string) (*QRCodeLoginResult, error)

GetQRCodeLoginResult 获取二维码登录结果

func (*LoginHelper) GetQRCodeLoginUrl

func (h *LoginHelper) GetQRCodeLoginUrl(keyStr string) (*QRCodeUrlResult, error)

GetQRCodeLoginUrl 获取登录二维码链接

func (*LoginHelper) GetRefreshToken

func (h *LoginHelper) GetRefreshToken(tokenId string) (*QRCodeLoginResult, error)

GetRefreshToken 获取Token

func (*LoginHelper) ParseSecureRefreshToken

func (h *LoginHelper) ParseSecureRefreshToken(keyStr, secureRefreshToken string) (string, error)

ParseSecureRefreshToken 解密Token

type LoginHttpResult

type LoginHttpResult struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type QRCodeLoginResult

type QRCodeLoginResult struct {
	QrCodeStatus       string `json:"qrCodeStatus"`
	SecureRefreshToken string `json:"secureRefreshToken"`
}

QRCodeLoginResult 二维码登录结果

type QRCodeUrlResult

type QRCodeUrlResult struct {
	TokenId     string `json:"tokenId"`
	TokenUrl    string `json:"tokenUrl"`
	ExpiredTime int    `json:"expiredTime"`
}

QRCodeUrlResult 二维码登录页面

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL