Skip to content

Commit

Permalink
Merge pull request #965 from JanssenProject/jans-auth-server-issue-946-1
Browse files Browse the repository at this point in the history
fix(jans-auth-server): corrected ParValidatorTest #946
  • Loading branch information
yuriyz committed Mar 3, 2022
2 parents 306bd52 + 04a01fd commit eea33ea
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 eea33ea

Please sign in to comment.