Skip to content

Commit

Permalink
Merge pull request #18117 from Lakshan-Banneheke/jwt-test-fix
Browse files Browse the repository at this point in the history
Integration tests for the fix for issue in claim mapping for token exchange and jwt grant flow
  • Loading branch information
VivekVinushanth authored Nov 30, 2023
2 parents 23c3050 + f73f5fa commit 4b770a8
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,12 @@ public void testJWTGrantTypeWithConvertOIDCDialectWithoutIDPMappingWithSPMapping

addFederatedIdentityProvider();
OIDCTokens oidcTokens = makeJWTBearerGrantRequest();
Assert.assertNull(oidcTokens.getIDToken().getJWTClaimsSet().getClaim(COUNTRY_NEW_OIDC_CLAIM),
"User claims is returned back without mappings in SP and IDP side when ConvertToOIDCDialect is "
+ "set to true in identity.xml");
Assert.assertNull(oidcTokens.getIDToken().getJWTClaimsSet().getClaim(EMAIL_OIDC_CLAIM),
"User claims is returned back without mappings in SP and IDP side when ConvertToOIDCDialect is "
+ "set to true in identity.xml");
Assert.assertNull(oidcTokens.getIDToken().getJWTClaimsSet().getClaim(EMAIL_LOCAL_CLAIM_URI),
"User claims is returned back when IDP claim mapping is not set and with only SP Claim mapping");
Assert.assertEquals(oidcTokens.getIDToken().getJWTClaimsSet().getClaim(COUNTRY_NEW_OIDC_CLAIM),
COUNTRY_CLAIM_VALUE, "User claims is not returned back with SP claim mapping set and " +
"no IDP claim mapping when ConvertToOIDCDialect is set to true in identity.xml");
Assert.assertEquals(oidcTokens.getIDToken().getJWTClaimsSet().getClaim(EMAIL_OIDC_CLAIM), EMAIL_CLAIM_VALUE,
"User claims is not returned back with SP claim mapping set and " +
"no IDP claim mapping when ConvertToOIDCDialect is set to true in identity.xml");
}

@Test(description = "This test case tests the behaviour when ConvertOIDCDialect is set to true in identity.xml "
Expand Down

0 comments on commit 4b770a8

Please sign in to comment.