{"id":1460,"date":"2015-01-30T20:32:30","date_gmt":"2015-01-31T02:32:30","guid":{"rendered":"https:\/\/www.identityblog.com\/?page_id=1460"},"modified":"2015-01-30T20:42:26","modified_gmt":"2015-01-31T02:42:26","slug":"equality-transformation","status":"publish","type":"page","link":"https:\/\/www.identityblog.com\/?page_id=1460","title":{"rendered":"Equality Transformation"},"content":{"rendered":"<div>An Equality claims transformation compares a claim defined in the policy schema to a fixed value expressed in a &#8216;CompareTo&#8217;\u00a0parameter that is part of\u00a0its policy definition.\u00a0 Other parameters control whether the comparison should be case sensitive and whether to test for equality or inequality.\u00a0 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 claim 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>compareTo<\/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;\">The string to which the claim will 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>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;Equality&#8217; type called &#8216;LocalIdpTransform&#8217;. An claim called &#8216;loginIdp&#8217; in the policy Schema\u00a0 is compared to a &#8216;compareTo&#8217; parameter\u00a0configured to be\u00a0&#8216;EmailLocalAcount&#8217;.\u00a0\u00a0The comparison will not be case-sensitive.\u00a0 If the input claim equals the configured parameter, the transform will return a Boolean claim called &#8216;isIdpLocal&#8217; with the string value &#8216;true&#8217;;\u00a0 otherwise it returns &#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\">=\"LocalIdpTransform\"<\/span> <span class=\"attr\">TransformationMethod<\/span><span class=\"kwrd\">=\"Equality\"<\/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\">=\"loginIdp\"<\/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\">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\">=\"compareTo\"<\/span> <span class=\"attr\">DataType<\/span><span class=\"kwrd\">=\"string\"<\/span> <span class=\"attr\">Value<\/span><span class=\"kwrd\">=\"EmailLocalAccount\"<\/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\">=\"isIdpLocal\"<\/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>An Equality claims transformation compares a claim defined in the policy schema to a fixed value expressed in a &#8216;CompareTo&#8217;\u00a0parameter that is part of\u00a0its policy definition.\u00a0 Other parameters control whether the comparison should be case sensitive and whether to test for equality or inequality.\u00a0 The result of the comparison is returned as a Boolean claim. &hellip; <a href=\"https:\/\/www.identityblog.com\/?page_id=1460\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Equality 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\/1460"}],"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=1460"}],"version-history":[{"count":3,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages\/1460\/revisions"}],"predecessor-version":[{"id":1466,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages\/1460\/revisions\/1466"}],"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=1460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}