ASP.NET control for claims-aware apps

Vittorio just announced it in his blog… we helped writing an experiment of raising the level of abstraction to work against claims. We created a server control that allows you to work with claims. There are three types of expression:
  • Claim Value: set the value of a property with the value of a specified claim type
<cc1:ClaimsDrivenModifierControl ID="cdmFirstName" runat="server" ControlToDrive="txtFirstName" PropertyToModify="Text"> <Expression Type="ClaimValue"> <ClaimType></ClaimType> </Expression> </cc1:ClaimsDrivenModifierControl>
  • Condition: set the value of a property based on a condition <cc1:ClaimsDrivenModifierControl ID="cdmPrivileges" runat="server" ControlToDrive="pnlPrivileges" PropertyToModify="Visible"> <Expression Type="Condition"> <ClaimType></ClaimType> <Operator>Equals</Operator> <Value>FabrikamAirlines</Value> </Expression> </cc1:ClaimsDrivenModifierControl>
    • Mapping: it will set the value of a property based on a set of conditions with an output <cc1:ClaimsDrivenModifierControl ID="cdmMemebershipLevel" runat="server" ControlToDrive="imgMembershipLevel" PropertyToModify="ImageUrl"> <Expression Type="Mapping"> <cc1:Mapping ClaimType="" ClaimValue="silver" Result="~/img/silver.png" /> <cc1:Mapping ClaimType="" ClaimValue="gold" Result="~/img/gold.png" /> </Expression> </cc1:ClaimsDrivenModifierControl>
    And of course you can use the designer to set this all up. I’m not a huge fan of server controls and designers but I know that there are people out there that loves them, so this is something that will bring you closer to developing claims-aware applications. Download the control from
  • Published: June 19 2009

    blog comments powered by Disqus