Package com.foxinmy.weixin4j.wxa.api
Class LoginApi
- java.lang.Object
-
- com.foxinmy.weixin4j.api.BaseApi
-
- com.foxinmy.weixin4j.wxa.api.LoginApi
-
public class LoginApi extends BaseApi
登录凭证校验。- Since:
- 1.8
-
-
Field Summary
-
Fields inherited from class com.foxinmy.weixin4j.api.BaseApi
weixinExecutor
-
-
Constructor Summary
Constructors Constructor Description LoginApi(WeixinAccount weixinAccount)LoginApi(WeixinAccount weixinAccount, Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetRequestUri(String key)Sessionjscode2session(String jsCode)Sessionjscode2session(String jsCode, String grantType)登录凭证校验protected ResourceBundleweixinBundle()
-
-
-
Constructor Detail
-
LoginApi
public LoginApi(WeixinAccount weixinAccount)
-
LoginApi
public LoginApi(WeixinAccount weixinAccount, Properties properties)
-
-
Method Detail
-
jscode2session
public Session jscode2session(String jsCode) throws WeixinException
- Throws:
WeixinException
-
jscode2session
public Session jscode2session(String jsCode, String grantType) throws WeixinException
登录凭证校验- Parameters:
jsCode- 登录时获取的 codegrantType- 填写为 authorization_code- Returns:
- the session.
- Throws:
WeixinException- 发生错误时。比如js_code无效。- See Also:
- 登录凭证校验
-
weixinBundle
protected ResourceBundle weixinBundle()
- Specified by:
weixinBundlein classBaseApi
-
getRequestUri
protected String getRequestUri(String key)
- Overrides:
getRequestUriin classBaseApi
-
-