Skip to content

Wechat mini app oauth client, simple implementation

Notifications You must be signed in to change notification settings

ZhihaoJun/wxapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wxapp

Wechat mini app oauth client, simple implementation

api

type IWXLoginResponse interface {
	Errcode() int
	Errmsg() string
	OpenId() string
	SessionKey() string
	ExpiresIn() int64
}

type IWXUserInfo interface {
	OpenId() string
	Nickname() string
	Gender() int
	City() string
	Province() string
	Contry() string
	AvatarUrl() string
	UnionId() string
	WaterMark() map[string]interface{}
}

type IWXApp interface {
	Code2Session(code string) (IWXLoginResponse, error)
	DecryptUserInfo(encrypted, key, iv string) (IWXUserInfo, error)
	VerifySignature(raw, signature, key string) bool
	Decrypt(encrypted, key, iv64 string) ([]byte, error)
}

denpendencies

About

Wechat mini app oauth client, simple implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages