From c8946137fd3d8cbd5cde172dbbe87340168e7211 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 11 Mar 2019 15:27:23 +0800 Subject: [PATCH] =?UTF-8?q?-=20auth2.GetTokenInfo=E5=85=BC=E5=AE=B9V1=20to?= =?UTF-8?q?ken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/auth2.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/auth2.go b/controllers/auth2.go index 4b6c9350b..f54f4168c 100644 --- a/controllers/auth2.go +++ b/controllers/auth2.go @@ -81,7 +81,11 @@ func (c *Auth2Controller) Login() { // @router /GetTokenInfo [get] func (c *Auth2Controller) GetTokenInfo() { c.callGetTokenInfo(func(params *tAuth2GetTokenInfoParams) (retVal interface{}, errCode string, err error) { - retVal, err = auth2.GetTokenInfo(params.Token) + if auth2.IsV2Token(params.Token) { + retVal, err = auth2.GetTokenInfo(params.Token) + } else { + retVal, err = auth.GetUserInfo(params.Token) + } return retVal, "", err }) }