test登录
This commit is contained in:
@@ -27,6 +27,7 @@ var (
|
|||||||
AutherObjWX *Auther
|
AutherObjWX *Auther
|
||||||
AutherObjMP *Auther
|
AutherObjMP *Auther
|
||||||
AutherObjNative *Auther
|
AutherObjNative *Auther
|
||||||
|
AutherObjApp *Auther
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -48,6 +49,11 @@ func init() {
|
|||||||
authType: AuthTypeWXNative,
|
authType: AuthTypeWXNative,
|
||||||
}
|
}
|
||||||
auth2.RegisterAuther(AuthTypeWXNative, AutherObjNative)
|
auth2.RegisterAuther(AuthTypeWXNative, AutherObjNative)
|
||||||
|
|
||||||
|
AutherObjApp = &Auther{
|
||||||
|
authType: AuthTypeWxApp,
|
||||||
|
}
|
||||||
|
auth2.RegisterAuther(AuthTypeWxApp, AutherObjApp)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Auther) VerifySecret(id, secret string) (authBindEx *auth2.AuthBindEx, err error) {
|
func (a *Auther) VerifySecret(id, secret string) (authBindEx *auth2.AuthBindEx, err error) {
|
||||||
|
|||||||
@@ -27,15 +27,11 @@ var (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
AutherObjMini *MiniAuther
|
AutherObjMini *MiniAuther
|
||||||
AutherObjApp *MiniAuther
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
AutherObjMini = new(MiniAuther)
|
AutherObjMini = new(MiniAuther)
|
||||||
auth2.RegisterAuther(AuthTypeMini, AutherObjMini)
|
auth2.RegisterAuther(AuthTypeMini, AutherObjMini)
|
||||||
|
|
||||||
AutherObjApp = new(MiniAuther)
|
|
||||||
auth2.RegisterAuther(AuthTypeWxApp, AutherObjApp)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *MiniAuther) VerifySecret(dummy, jsCode string) (authBindEx *auth2.AuthBindEx, err error) {
|
func (a *MiniAuther) VerifySecret(dummy, jsCode string) (authBindEx *auth2.AuthBindEx, err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user