代码调整

This commit is contained in:
2023-06-30 11:37:36 +08:00
parent 82c538fb03
commit 9b0404a207
6 changed files with 40 additions and 23 deletions

View File

@@ -26,13 +26,13 @@ public class AuthTest extends BaseJunitTest {
@SneakyThrows
@Test
public void test(){
String userUrl = "http://127.0.0.1:10215/pqs-auth/oauth/token";
String userUrl = "http://127.0.0.1:10214/oauth/token";
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(userUrl)
.queryParam("grant_type", "password")
.queryParam("client_id", "njcn")
.queryParam("grant_type", "sms_code")
.queryParam("client_id", "app")
.queryParam("client_secret", "njcnpqs")
.queryParam("username", "root")
.queryParam("password", "@#001njcnpqs");
.queryParam("phone", "root")
.queryParam("smsCode", "98746312123");
URI uri = builder.build().encode().toUri();
ResponseEntity<OAuth2AccessToken> userEntity = RestTemplateUtil.post(uri, OAuth2AccessToken.class);