Skip to content

Commit

Permalink
Added test with state parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Sep 13, 2024
1 parent a6c076a commit 5348cf7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/oidc/endpoints/AuthorizationEndpointTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,17 @@ public void queryParamState() throws IOException {
assertEquals(state, URLDecoder.decode(stateReturned, defaultCharset()));
}

@Test
public void queryParamStateWithSemiColon() throws IOException {
String state = "signon;eu;1725954357882971540;/";
Response response = doAuthorizeWithClaimsAndScopes("mock-sp", "code",
null, null, null, null, null, state);
String location = response.getHeader("Location");
Map<String, String> queryParams = super.queryParamsToMap(location);
String stateReturned = queryParams.get("state");
assertEquals(state, URLDecoder.decode(stateReturned, defaultCharset()));
}

@Test
public void queryParamStateParameterDecodingDisabled() throws IOException {
String state = "https://example.com";
Expand Down

0 comments on commit 5348cf7

Please sign in to comment.