use of org.apache.cxf.sts.claims.ProcessedClaim in project cxf by apache.
the class JexlClaimsMapperTest method testLowerCaseClaim.
@Test
public void testLowerCaseClaim() throws IOException {
ProcessedClaimCollection result = jcm.mapClaims("A", createClaimCollection(), "B", createProperties());
assertNotNull(result);
ProcessedClaim claim = findClaim(result, "http://my.schema.org/identity/claims/lowercase");
assertNotNull(claim);
assertNotNull(claim.getValues());
assertEquals(2, claim.getValues().size());
assertEquals("value2", claim.getValues().get(1));
}
use of org.apache.cxf.sts.claims.ProcessedClaim in project cxf by apache.
the class JexlClaimsMapperTest method testUpperCaseClaim.
@Test
public void testUpperCaseClaim() throws IOException {
ProcessedClaimCollection result = jcm.mapClaims("A", createClaimCollection(), "B", createProperties());
assertNotNull(result);
ProcessedClaim claim = findClaim(result, "http://my.schema.org/identity/claims/uppercase");
assertNotNull(claim);
assertNotNull(claim.getValues());
assertEquals(2, claim.getValues().size());
assertEquals("VALUE2", claim.getValues().get(1));
}
use of org.apache.cxf.sts.claims.ProcessedClaim in project cxf by apache.
the class JexlClaimsMapperTest method testSimpleClaimCopy.
@Test
public void testSimpleClaimCopy() throws IOException {
ProcessedClaimCollection result = jcm.mapClaims("A", createClaimCollection(), "B", createProperties());
assertNotNull(result);
ProcessedClaim claim = findClaim(result, "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mail");
assertNotNull(claim);
assertNotNull(claim.getValues());
assertEquals(1, claim.getValues().size());
assertEquals("test@apache.com", claim.getValues().get(0));
}
use of org.apache.cxf.sts.claims.ProcessedClaim in project cxf by apache.
the class JexlClaimsMapperTest method testValueFilter.
@Test
public void testValueFilter() throws IOException {
ProcessedClaimCollection result = jcm.mapClaims("A", createClaimCollection(), "B", createProperties());
assertNotNull(result);
ProcessedClaim claim = findClaim(result, "http://my.schema.org/identity/claims/filter");
assertEquals(2, claim.getValues().size());
assertTrue(claim.getValues().contains("match"));
assertTrue(claim.getValues().contains("second_match"));
}
use of org.apache.cxf.sts.claims.ProcessedClaim in project cxf by apache.
the class JexlClaimsMapperTest method testSingleToMultiValue.
@Test
public void testSingleToMultiValue() throws IOException {
ProcessedClaimCollection result = jcm.mapClaims("A", createClaimCollection(), "B", createProperties());
assertNotNull(result);
ProcessedClaim claim = findClaim(result, "http://my.schema.org/identity/claims/single2multi");
assertNotNull(claim);
assertNotNull(claim.getValues());
assertEquals(3, claim.getValues().size());
assertEquals("Value2", claim.getValues().get(1));
}
Aggregations