{"id":1468,"date":"2015-01-30T23:33:00","date_gmt":"2015-01-31T05:33:00","guid":{"rendered":"https:\/\/www.identityblog.com\/?page_id=1468"},"modified":"2015-01-30T23:33:00","modified_gmt":"2015-01-31T05:33:00","slug":"claimtoclaimequality-transformation","status":"publish","type":"page","link":"https:\/\/www.identityblog.com\/?page_id=1468","title":{"rendered":"ClaimToClaimEquality Transformation"},"content":{"rendered":"<div>A ClaimToClaimEquality claims transformation compares\u00a0the value of one claim defined in the policy schema to that of a second claim defined there. Other parameters control whether the comparison should be case sensitive and whether to test for equality or inequality. The result of the comparison is returned as a Boolean claim.<\/div>\n<p>&nbsp;<\/p>\n<div>\n<table style=\"border-collapse: collapse; background: #e2efd9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 615px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr>\n<td style=\"padding-left: 9px; padding-right: 9px; border: solid #bfbfbf 0.5pt;\">\n<p style=\"text-align: center;\"><span style=\"font-size: 12pt;\"><strong>InputClaims<\/strong><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table style=\"border-collapse: collapse;\" border=\"0\">\n<colgroup>\n<col style=\"width: 277px;\" \/>\n<col style=\"width: 338px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"background: white;\">\n<td style=\"padding-left: 9px; padding-right: 9px; border-bottom: solid #7f7f7f 0.5pt;\">\n<p style=\"text-align: right;\"><span style=\"font-size: 13pt;\"><em>TransformationClaimType<\/em><\/span><\/p>\n<\/td>\n<td style=\"padding-left: 9px; padding-right: 9px; border-bottom: solid #7f7f7f 0.5pt;\"><span style=\"font-size: 13pt;\"><em>Description<\/em><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"background: white; padding-left: 9px; padding-right: 9px; border-right: solid #7f7f7f 0.5pt;\">\n<p style=\"text-align: right;\"><span style=\"font-size: 13pt;\"><em>inputClaim1<\/em><\/span><\/p>\n<\/td>\n<td style=\"background: #f2f2f2; padding-left: 9px; padding-right: 9px;\">The first of two claims whose values are to be compared<\/td>\n<\/tr>\n<tr>\n<td style=\"background: white; padding-left: 9px; padding-right: 9px; border-right: solid #7f7f7f 0.5pt;\">\n<p style=\"text-align: right;\"><span style=\"font-size: 13pt;\"><em>inputClaim2<\/em><\/span><\/p>\n<\/td>\n<td style=\"background: #f2f2f2; padding-left: 9px; padding-right: 9px;\">The second of the claims to be compared<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table style=\"border-collapse: collapse; background: #e2efd9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 615px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr>\n<td style=\"padding-left: 9px; padding-right: 9px; border: solid #bfbfbf 0.5pt;\">\n<p style=\"text-align: center;\"><span style=\"font-size: 12pt;\"><strong>InputParameters<\/strong><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table style=\"border-collapse: collapse;\" border=\"0\">\n<colgroup>\n<col style=\"width: 176px;\" \/>\n<col style=\"width: 169px;\" \/>\n<col style=\"width: 278px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"background: white;\">\n<td style=\"padding-left: 9px; padding-right: 9px; border-bottom: solid #7f7f7f 0.5pt;\">\n<p style=\"text-align: right;\"><span style=\"font-size: 13pt;\"><em>Id<\/em><\/span><\/p>\n<\/td>\n<td style=\"padding-left: 9px; padding-right: 9px; border-bottom: solid #7f7f7f 0.5pt;\"><span style=\"font-size: 13pt;\"><em>DataType<\/em><\/span><\/td>\n<td style=\"padding-left: 9px; padding-right: 9px; border-bottom: solid #7f7f7f 0.5pt;\"><span style=\"font-size: 13pt;\"><em>Value<\/em><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"background: white; padding-left: 9px; padding-right: 9px; border-right: solid #7f7f7f 0.5pt;\">\n<p style=\"text-align: right;\"><span style=\"font-size: 13pt;\"><em>ignoreCase<\/em><\/span><\/p>\n<\/td>\n<td style=\"background: #f2f2f2; padding-left: 9px; padding-right: 9px;\">boolean<\/td>\n<td style=\"background: #f2f2f2; padding-left: 9px; padding-right: 9px;\">The string &#8216;true&#8217; or the string &#8216;false&#8217;<\/td>\n<\/tr>\n<tr>\n<td style=\"background: white; padding-left: 9px; padding-right: 9px; border-right: solid #7f7f7f 0.5pt;\">\n<p style=\"text-align: right;\"><span style=\"font-size: 13pt;\"><em>operator<\/em><\/span><\/p>\n<\/td>\n<td style=\"background: #f2f2f2; padding-left: 9px; padding-right: 9px;\">string<\/td>\n<td style=\"background: #f2f2f2; padding-left: 9px; padding-right: 9px;\">Either &#8216;EQUAL&#8217; or &#8216;NOT EQUAL&#8217;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table style=\"border-collapse: collapse; background: #e2efd9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 615px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr>\n<td style=\"padding-left: 9px; padding-right: 9px; border: solid #bfbfbf 0.5pt;\">\n<p style=\"text-align: center;\"><span style=\"font-size: 12pt;\"><strong>OutputClaims<\/strong><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table style=\"border-collapse: collapse;\" border=\"0\">\n<colgroup>\n<col style=\"width: 277px;\" \/>\n<col style=\"width: 338px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"background: white;\">\n<td style=\"padding-left: 9px; padding-right: 9px; border-bottom: solid #7f7f7f 0.5pt;\">\n<p style=\"text-align: right;\"><span style=\"font-size: 13pt;\"><em>TransformationClaimType<\/em><\/span><\/p>\n<\/td>\n<td style=\"padding-left: 9px; padding-right: 9px; border-bottom: solid #7f7f7f 0.5pt;\"><span style=\"font-size: 13pt;\"><em>Description<\/em><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"background: white; padding-left: 9px; padding-right: 9px; border-right: solid #7f7f7f 0.5pt;\">\n<p style=\"text-align: right;\"><span style=\"font-size: 13pt;\"><em>outputClaim<\/em><\/span><\/p>\n<\/td>\n<td style=\"background: #f2f2f2; padding-left: 9px; padding-right: 9px;\">The booklean result of the comparison<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table style=\"border-collapse: collapse; background: #e2efd9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 615px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr>\n<td style=\"padding-left: 9px; padding-right: 9px; border: solid #bfbfbf 0.5pt;\">\n<p style=\"text-align: center;\"><span style=\"font-size: 12pt;\"><strong>Example<\/strong><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<p>This example defines a ClaimsTransformation of the &#8216;ClaimToClaimEquality&#8217; type called &#8216;EmailComparisonTransform&#8217;. An claim called &#8217;email&#8217; in the policy Schema is compared to a &#8216;secondaryEmail&#8217; claim. The comparison will not be case-sensitive. If the input claims are the same, the transform will return a Boolean claim called &#8216;isEmailConsistent&#8217; with the string value &#8216;true&#8217;; otherwise\u00a0the string value will be\u00a0&#8216;false&#8217;.<\/p>\n<\/div>\n<p><!-- code formatted by http:\/\/manoli.net\/csharpformat\/ --><\/p>\n<pre class=\"csharpcode\">      \r\n<span class=\"kwrd\">&lt;<\/span><span class=\"html\">ClaimsTransformation<\/span> <span class=\"attr\">Id<\/span><span class=\"kwrd\">=\"EmailComparisonTransform\"<\/span> <span class=\"attr\">TransformationMethod<\/span><span class=\"kwrd\">=\"ClaimToClaimEquality\"<\/span><span class=\"kwrd\">&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputClaims<\/span><span class=\"kwrd\">&gt;<\/span>\r\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputClaim<\/span> <span class=\"attr\">ClaimTypeReferenceId<\/span><span class=\"kwrd\">=\"email\"<\/span> <span class=\"attr\">TransformationClaimType<\/span><span class=\"kwrd\">=\"inputClaim1\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\r\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputClaim<\/span> <span class=\"attr\">ClaimTypeReferenceId<\/span><span class=\"kwrd\">=\"secondaryEmail\"<\/span> <span class=\"attr\">TransformationClaimType<\/span><span class=\"kwrd\">=\"inputClaim2\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">InputClaims<\/span><span class=\"kwrd\">&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputParameters<\/span><span class=\"kwrd\">&gt;<\/span>\r\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputParameter<\/span> <span class=\"attr\">Id<\/span><span class=\"kwrd\">=\"ignoreCase\"<\/span> <span class=\"attr\">DataType<\/span><span class=\"kwrd\">=\"string\"<\/span> <span class=\"attr\">Value<\/span><span class=\"kwrd\">=\"true\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\r\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputParameter<\/span> <span class=\"attr\">Id<\/span><span class=\"kwrd\">=\"operator\"<\/span> <span class=\"attr\">DataType<\/span><span class=\"kwrd\">=\"string\"<\/span> <span class=\"attr\">Value<\/span><span class=\"kwrd\">=\"EQUAL\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">InputParameters<\/span><span class=\"kwrd\">&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">OutputClaims<\/span><span class=\"kwrd\">&gt;<\/span>\r\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">OutputClaim<\/span> <span class=\"attr\">ClaimTypeReferenceId<\/span><span class=\"kwrd\">=\"isEmailConsistent\"<\/span> <span class=\"attr\">TransformationClaimType<\/span><span class=\"kwrd\">=\"outputClaim\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">OutputClaims<\/span><span class=\"kwrd\">&gt;<\/span>\r\n      <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">ClaimsTransformation<\/span><span class=\"kwrd\">&gt;<\/span>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A ClaimToClaimEquality claims transformation compares\u00a0the value of one claim defined in the policy schema to that of a second claim defined there. Other parameters control whether the comparison should be case sensitive and whether to test for equality or inequality. The result of the comparison is returned as a Boolean claim. &nbsp; InputClaims TransformationClaimType Description &hellip; <a href=\"https:\/\/www.identityblog.com\/?page_id=1468\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">ClaimToClaimEquality Transformation<\/span><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"parent":1453,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages\/1468"}],"collection":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1468"}],"version-history":[{"count":1,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages\/1468\/revisions"}],"predecessor-version":[{"id":1469,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages\/1468\/revisions\/1469"}],"up":[{"embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages\/1453"}],"wp:attachment":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}