验签修改

This commit is contained in:
lu7213 committed 2026-10-17 00:25:07 -04:00
1 parent 9daba4a98e
commit 454da449c4
2 files changed
+10 -15

No files matched your search

@@ -75,13 +75,14 @@ public class SysUsdtDemoControllerTest {
}
@Test
public void notifyShouldRejectWrongApiKey() {
public void notifyShouldUseRsaAsTheOnlyAuthenticationMechanism() {
String signature = PaymentSignatureService.signRsa(values, privateKey);
ResponseEntity<String> response = controller.notify("wrong-key", signature,
JSON.toJSONString(values));
assertEquals(HttpStatus.UNAUTHORIZED, response.getStatusCode());
assertEquals(HttpStatus.OK, response.getStatusCode());
assertEquals("ok", response.getBody());
}
@Test