Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests for the fix for issue in claim mapping for token exchange and jwt grant flow #18117

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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