Skip to content

Commit

Permalink
Add assert to check for the expected error message
Browse files Browse the repository at this point in the history
  • Loading branch information
strehle committed Jun 11, 2024
1 parent 9d5be32 commit 3ad69d6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,8 @@ void oidcPasswordGrant_requireAuthenticationStatement() {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken("user", new Object());
OIDCIdentityProviderDefinition config = new OIDCIdentityProviderDefinition()
.setRelyingPartyId("client-id");
assertThrows(ProviderConfigurationException.class, () -> instance.oidcPasswordGrant(authentication, config));
Exception exception = assertThrows(ProviderConfigurationException.class, () -> instance.oidcPasswordGrant(authentication, config));
assertEquals("External OpenID Connect provider configuration is missing relyingPartySecret, jwtClientAuthentication or authMethod.", exception.getMessage());
}

private void mockKeyInfoService() throws JOSEException {
Expand Down

0 comments on commit 3ad69d6

Please sign in to comment.