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 com.foxinmy.weixin4j.api.BaseApi登录凭证校验。- Since:
- 1.8
-
-
Constructor Summary
Constructors Constructor Description LoginApi(com.foxinmy.weixin4j.model.WeixinAccount weixinAccount)LoginApi(com.foxinmy.weixin4j.model.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(com.foxinmy.weixin4j.model.WeixinAccount weixinAccount)
-
LoginApi
public LoginApi(com.foxinmy.weixin4j.model.WeixinAccount weixinAccount, Properties properties)
-
-
Method Detail
-
jscode2session
public Session jscode2session(String jsCode) throws com.foxinmy.weixin4j.exception.WeixinException
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
-
jscode2session
public Session jscode2session(String jsCode, String grantType) throws com.foxinmy.weixin4j.exception.WeixinException
登录凭证校验- Parameters:
jsCode- 登录时获取的 codegrantType- 填写为 authorization_code- Returns:
- the session.
- Throws:
com.foxinmy.weixin4j.exception.WeixinException- 发生错误时。比如js_code无效。- See Also:
- 登录凭证校验
-
weixinBundle
protected ResourceBundle weixinBundle()
- Specified by:
weixinBundlein classcom.foxinmy.weixin4j.api.BaseApi
-
-