<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Mocking RIA Services Authentication and Authorization</title><link>http://blogs.msdn.com/b/kylemc/archive/2010/07/14/mocking-ria-services-authentication-and-authorization.aspx</link><description>I’m about to embark on a series of Silverlight Authorization-related posts using a shared sample project. I use this base project as a template to share functionality and visual consistency to my sample applications. Most of the template is pretty straightforward</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Mocking RIA Services Authentication and Authorization</title><link>http://blogs.msdn.com/b/kylemc/archive/2010/07/14/mocking-ria-services-authentication-and-authorization.aspx#10351743</link><pubDate>Thu, 20 Sep 2012 21:52:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10351743</guid><dc:creator>Christoph Murczek</dc:creator><description>&lt;p&gt;I was so busy looking for a factory for a Principal that I missed the obvious. In case anybody is wondering, the answer to my question above is... your mocking framework of choice. There you have it. Just define types implementing IIdentity and IPrincipal and have Moq, Rhino,... stub the properties for you.&lt;/p&gt;
&lt;p&gt;Applying the same thought to the MockAuthenticationService you can use you mocking framework to model return values of the MockAuthenticationService&amp;#39;s EndYyy methods. Or you sysnchronize the async pattern and mock the sync method.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10351743" width="1" height="1"&gt;</description></item><item><title>re: Mocking RIA Services Authentication and Authorization</title><link>http://blogs.msdn.com/b/kylemc/archive/2010/07/14/mocking-ria-services-authentication-and-authorization.aspx#10350618</link><pubDate>Tue, 18 Sep 2012 21:38:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10350618</guid><dc:creator>Christoph Murczek</dc:creator><description>&lt;p&gt;Hi Kyle,&lt;/p&gt;
&lt;p&gt;thanks for sharing this. One thing I don&amp;#39;t get however. The MockAuthenticationService is intended to be used on the Silverlight client. As far as I know there&amp;#39;s no way in Silverlight to instantiate something like a GenericPrincipal or get the currently logged in user other than using an actual AuthenticationService implementation which is what we&amp;#39;re trying to avoid here. Where do I get the IPrincipal from that I need to instatiate the MockAuthenticationService and what would I use to set MockUser? Without an actual AuthenticationService I can&amp;#39;t get any Principals or do I miss something?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10350618" width="1" height="1"&gt;</description></item></channel></rss>