Class FeishuCallbackController
java.lang.Object
io.agentscope.extensions.channel.feishu.FeishuCallbackController
@RestController
@RequestMapping("/api/channels/feishu")
public class FeishuCallbackController
extends Object
Handles the Feishu URL verification handshake and event-subscription callbacks.
Single endpoint at POST /api/channels/feishu/{channelId}/callback. The body is JSON;
either a plain envelope or {"encrypt":"<base64>"}. The controller:
- Decrypts the envelope when
encryptKeyis configured - Verifies the
X-Lark-Signatureheader when present - Echoes the URL verification
challengeon the verification handshake - Deduplicates by
header.event_id - Applies the bot-loop guard and dispatches to the channel
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FeishuCallbackController
public FeishuCallbackController()
-
-
Method Details
-
callback
@PostMapping(value="/{channelId}/callback", consumes="application/json", produces="application/json") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<String>> callback(@PathVariable String channelId, @RequestHeader(value="X-Lark-Signature",required=false) String signature, @RequestHeader(value="X-Lark-Request-Timestamp",required=false) String timestamp, @RequestHeader(value="X-Lark-Request-Nonce",required=false) String nonce, @RequestBody String rawBody)
-