Fix tests
This commit is contained in:
1 parent
e05afd2e48
commit
07f27633ac
2 files changed
+6
-6
No files matched your search
+2
-2
@@ -205,7 +205,7 @@ public class CustomFlowTest {
|
||||
PassThroughClientAuthenticator.clientId = "unknown";
|
||||
OAuthClient.AccessTokenResponse response = oauth.doGrantAccessTokenRequest("password", "test-user", "password");
|
||||
assertEquals(400, response.getStatusCode());
|
||||
assertEquals("invalid_client", response.getError());
|
||||
assertEquals("unauthorized_client", response.getError());
|
||||
|
||||
events.expectLogin()
|
||||
.client((String) null)
|
||||
@@ -214,7 +214,7 @@ public class CustomFlowTest {
|
||||
.removeDetail(Details.CODE_ID)
|
||||
.removeDetail(Details.REDIRECT_URI)
|
||||
.removeDetail(Details.CONSENT)
|
||||
.error(Errors.CLIENT_NOT_FOUND)
|
||||
.error(Errors.INVALID_CLIENT_CREDENTIALS)
|
||||
.assertEvent();
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -212,7 +212,7 @@ public class ClientAuthSignedJWTTest {
|
||||
HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters);
|
||||
OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp);
|
||||
|
||||
assertError(response, null, "invalid_client", Errors.INVALID_CLIENT);
|
||||
assertError(response, null, "unauthorized_client", Errors.INVALID_CLIENT_CREDENTIALS);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -224,7 +224,7 @@ public class ClientAuthSignedJWTTest {
|
||||
HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters);
|
||||
OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp);
|
||||
|
||||
assertError(response, null, "invalid_client", Errors.INVALID_CLIENT);
|
||||
assertError(response, null, "unauthorized_client", Errors.INVALID_CLIENT_CREDENTIALS);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -236,7 +236,7 @@ public class ClientAuthSignedJWTTest {
|
||||
HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters);
|
||||
OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp);
|
||||
|
||||
assertError(response, null, "invalid_client", Errors.INVALID_CLIENT_CREDENTIALS);
|
||||
assertError(response, null, "unauthorized_client", Errors.INVALID_CLIENT_CREDENTIALS);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -268,7 +268,7 @@ public class ClientAuthSignedJWTTest {
|
||||
HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters);
|
||||
OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp);
|
||||
|
||||
assertError(response, "unknown-client", "invalid_client", Errors.CLIENT_NOT_FOUND);
|
||||
assertError(response, "unknown-client", "unauthorized_client", Errors.INVALID_CLIENT_CREDENTIALS);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user