验签修改
This commit is contained in:
1 parent
9daba4a98e
commit
454da449c4
2 files changed
+10
-15
No files matched your search
+3
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user