KEYCLOAK-3220 Added test for missing response_type
This commit is contained in:
parent
a2ead8743f
commit
021c2ec701
1 changed files with 13 additions and 0 deletions
|
@ -158,6 +158,19 @@ public class AuthorizationCodeTest extends AbstractKeycloakTest {
|
|||
events.expectLogin().error(Errors.NOT_ALLOWED).user((String) null).session((String) null).clearDetails().detail(Details.RESPONSE_TYPE, "token id_token").assertEvent();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void authorizationRequestMissingResponseType() throws IOException {
|
||||
oauth.responseType(null);
|
||||
UriBuilder b = UriBuilder.fromUri(oauth.getLoginFormUrl());
|
||||
driver.navigate().to(b.build().toURL());
|
||||
|
||||
OAuthClient.AuthorizationCodeResponse errorResponse = new OAuthClient.AuthorizationCodeResponse(oauth);
|
||||
Assert.assertTrue(errorResponse.isRedirected());
|
||||
Assert.assertEquals(errorResponse.getError(), OAuthErrorException.INVALID_REQUEST);
|
||||
|
||||
events.expectLogin().error(Errors.INVALID_REQUEST).user((String) null).session((String) null).clearDetails().assertEvent();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void authorizationRequestInvalidResponseType() throws IOException {
|
||||
oauth.responseType("tokenn");
|
||||
|
|
Loading…
Reference in a new issue