-
ASP.NET control for claims-aware apps
2 CommentsVittorio 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>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname</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>http://cloudbuddies.com/2009/06/FrequentFlierProgram</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=”http://cloudbuddies.com/2009/06/FrequentFlierLevel” ClaimValue=”silver” Result=”~/img/silver.png” /> <cc1:Mapping ClaimType=”http://cloudbuddies.com/2009/06/FrequentFlierLevel” 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 http://code.msdn.microsoft.com/ClaimsDrivenControl/Release/ProjectReleases.aspx?ReleaseId=2861
-
2 Comments:
Leave a comment
Your email address will not be published.
DotNetShoutout said on July 4, 2009:
Matias Woloski’s Blog » Blog Archive » ASP.NET control for claims-aware apps…
Thank you for submitting this cool story – Trackback from DotNetShoutout…
DotNet Feed said on July 5, 2009:
Matias Woloski’s Blog » Blog Archive » ASP.NET control for claims-aware apps…
Thank you for submitting this cool story – Trackback from DotNet Feed…