WeixinLoginClient
public final class WeixinLoginClient
io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:38–175Weixin Login 客户端,封装与远端服务的连接和调用。位于 io.agentscope.extensions.channel.weixin 包。核心成员包括 start、poll、verify、WeixinLoginClient。
Reusable QR login client for Tencent iLink personal Weixin accounts.
The status URL carries a login secret. The provider protocol takes qrcode —
and, when it asks for one, verify_code — as GET query parameters of get_qrcode_status, so the request URI is short-lived credential material rather than something
safe to record. Do not add request-URI logging, a generic HTTP client interception, or any
wrapper that copies the URI into an exception message. Failures are reported by status code and
parse position only; see #response.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public WeixinLoginClient() | 初始化 `WeixinLoginClient` 实例。 Creates a new instance. |
public WeixinLoginClient(String baseUrl, Duration timeout) | 初始化 `WeixinLoginClient` 实例。 Creates a new instance. |
方法摘要Method Summary
构造器详情Constructor Detail
WeixinLoginClient
public WeixinLoginClient()
初始化 WeixinLoginClient 实例。
Creates a new instance.
io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:44–46WeixinLoginClient
public WeixinLoginClient(String baseUrl, Duration timeout)
初始化 WeixinLoginClient 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
baseUrl | String | 基类 URL(类型 `String`)。The base url. |
timeout | Duration | 超时时间(类型 `Duration`)。The timeout. |
io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:48–52方法详情Method Detail
start
public WeixinLoginChallenge start(String botType) throws Exception
设置启动。
Performs the start operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
botType | String | bot 类型(类型 `String`)。The bot type. |
WeixinLoginChallengeException可能抛出 `Exception`。Thrown when the operation cannot be completed.
io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:54–66poll
public WeixinLoginStep poll(WeixinLoginSession session) throws Exception
设置该参数。
Performs the poll operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
session | WeixinLoginSession | 会话(类型 `WeixinLoginSession`)。The session. |
WeixinLoginStepException可能抛出 `Exception`。Thrown when the operation cannot be completed.
io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:68–70verify
public WeixinLoginStep verify(WeixinLoginSession session, String verifyCode) throws Exception
执行 verify 方法。
Performs the verify operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
session | WeixinLoginSession | 会话(类型 `WeixinLoginSession`)。The session. |
verifyCode | String | verify Code(类型 `String`)。The verify code. |
WeixinLoginStepException可能抛出 `Exception`。Thrown when the operation cannot be completed.
io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:72–77