Skip to content

Commit

Permalink
fix(jans-auth-server): corrected ParValidatorTest #946
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyz committed Mar 3, 2022
1 parent 21cecb0 commit 04a01fd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ public class ParValidatorTest {
public void validatePkce_whenFapiIsFalse_shouldNotThrowError() {
when(appConfiguration.isFapi()).thenReturn(false);

parValidator.validatePkce(null, null);
parValidator.validatePkce(null, null, null);
}

@Test(expectedExceptions = WebApplicationException.class)
public void validatePkce_whenFapiIsTrueAndNoCodeChallenage_shouldThrowError() {
when(appConfiguration.isFapi()).thenReturn(true);

parValidator.validatePkce(null, null);
parValidator.validatePkce(null, "s256", null);
}

@Test
public void validatePkce_whenFapiIsTrueAndCodeChallenageIsSet_shouldNotThrowError() {
when(appConfiguration.isFapi()).thenReturn(true);

parValidator.validatePkce("codechallangehere", null);
parValidator.validatePkce("codechallangehere", "s256",null);
}

}

0 comments on commit 04a01fd

Please sign in to comment.