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 String
getRequestUri(String key)
Session
jscode2session(String jsCode)
Session
jscode2session(String jsCode, String grantType)
登录凭证校验protected ResourceBundle
weixinBundle()
-
-
-
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:
weixinBundle
in classBaseApi
-
getRequestUri
protected String getRequestUri(String key)
- Overrides:
getRequestUri
in classBaseApi
-
-