<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Authorization</title><link>http://www.asp.net</link><pubDate>Tue, 14 Aug 2012 08:50:05 GMT</pubDate><generator>umbraco</generator><description>Comments for Authorization</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/43067" rel="self" type="application/rss+xml" /><item><title>Comment Posted by garrylindsay</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Mon, 27 Feb 2012 14:35:33 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014955</guid><description><![CDATA[ <p>Great starter vids.</p><p>Whats the best way if I have to write super custom join queries against SQL Azure for a Google like autocomplete that REST cannot handle? Do I just have a floating .svc file folder in the project for those special R queries of the CRUD?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/garrylindsay.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by pbernhardt</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Sun, 04 Mar 2012 11:21:05 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015015</guid><description><![CDATA[ <p>Nice series of videos, Jon. But I&#39;m looking to dig deeper into the authorization support, particularly how you would incorporate claims and, more generally, identity into a service built on top of Web API.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/pbernhardt.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by bhofmann</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Tue, 06 Mar 2012 16:04:02 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015036</guid><description><![CDATA[ <p>One thing I don&#39;t get, is how you would or could authorise when your Web API is not part of a website. I assume the authorisation is based on the membership provider, which implies either a login form or possibly Windows Authentication if the site is running in Integrated authentication mode?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/bhofmann.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jon galloway</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Wed, 07 Mar 2012 18:25:47 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015059</guid><description><![CDATA[ <p>@pbernhardt - That&#39;s a lot more involved, and I&#39;m not sure if we&#39;ve got a good sample of that yet. I&#39;ll check around. Two places to get started:</p><p>This TechDays video talks about securing Web API&#39;s on Azure, including ACS: <a rel="nofollow" href="http://www.microsoft.com/sv-se/showcase/details.aspx?uuid=ffc61019-9756-4175-adf4-7bdbc6dee400" target="_blank">www.microsoft.com/</a></p><p>Henrik&#39;s been blogging some more advanced scenarios:</p><p><a rel="nofollow" href="http://blogs.msdn.com/b/henrikn/" target="_blank">blogs.msdn.com/</a></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/jon%20galloway.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jon galloway</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Wed, 07 Mar 2012 18:30:50 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015060</guid><description><![CDATA[ <p>@bhofmann You can subclass the Authorize attribute to run any authorization code you&#39;d like in AuthorizeCore. There&#39;s a good blog post by David Hayden on how to do this with an MVC controller (and it&#39;s the same idea with Web API):</p><p><a rel="nofollow" href="http://davidhayden.com/blog/dave/archive/2009/04/09/CustomAuthorizationASPNETMVCFrameworkAuthorizeAttribute.aspx" target="_blank">davidhayden.com/</a></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/jon%20galloway.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by malkov</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Wed, 14 Mar 2012 07:06:47 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015117</guid><description><![CDATA[ <p>Your example doesn&#39;t work.</p><p>I&#39;ve installed VS11 and created new MVC4 WebAPI application. Then I&#39;ve added attribute [System.Web.Http.Authorize] to ValuesController, which was created by default.</p><p>Then I&#39;ve added the link to home page: &lt;a id=&quot;getAllItems&quot; href=&quot;#&quot;&gt;Get items&lt;/a&gt; and jquery for it, where i tried to react on status code 404.</p><p>But the site send back 302 instead of 401.</p><p></p><p>Any feedback about it?</p><p>                     </p><p>              </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/malkov.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by malkov</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Wed, 14 Mar 2012 07:17:39 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015118</guid><description><![CDATA[ <p>Sorry, of course I&#39;ve tried to react on status code 401 not 404:</p><p>$.ajax({</p><p>                    url: &quot;/api/values/&quot;,</p><p>                    accepts: &quot;application/json&quot;,</p><p>                    cache: false,</p><p>                    statusCode: {</p><p>                        200: function (values) {</p><p>                            alert(&quot;OK&quot;);</p><p>                        },</p><p>                        401: function () {</p><p>                            alert(&quot;Not authorized&quot;);</p><p>                        }                 </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/malkov.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by malkov</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Wed, 14 Mar 2012 09:40:39 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015122</guid><description><![CDATA[ <p>I&#39;ve found a solution at:</p><p><a rel="nofollow" href="http://netmvc.blogspot.com/2012/03/aspnet-mvc-4-webapi-authorization.html" target="_blank">netmvc.blogspot.com/</a></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/malkov.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by gkgorman</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Thu, 22 Mar 2012 11:12:49 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015180</guid><description><![CDATA[ <p>Why have two Login methods on the account controller?  Wouldn&#39;t it be better to have the API have an Account Controller with the JsonLogin and then have the MVC AccountController call the API Account Controller?  </p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/gkgorman.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by icelava</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Fri, 30 Mar 2012 06:58:53 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015224</guid><description><![CDATA[ <p>There probably needs to be a deeper explanation of the authorization concepts and mechanism behind the [Authorize] attribute that make it work.</p><p></p><p>E.g. how roles/claims come into play to authorize different actions to different users.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/icelava.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Jim S</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Mon, 02 Apr 2012 15:18:16 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015241</guid><description><![CDATA[ <p>I agree with other posters, an intriguing video, but I would like to know how it is &quot;authorizing&quot;, and how you can control who is authorized (i.e. Forms auth. and roles).</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Jim%20S.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Prabakard</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Tue, 10 Apr 2012 23:46:27 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015298</guid><description><![CDATA[ <p>Do you have any info / article / video on Authentication.</p><p>In the end of Part 5 video you mentioned that you will explain Web Api Authentication and Authorization in Next part (Part 6) of video. But the Part 6 talks only about Authorization and that too not complete. It says client will differentiate based on the status code. But how does Server decides to return those status codes. When the Authorize fails and when it succeeds.. its obviously about authentication, about which there is no info. </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/Prabakard.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by theshadow330</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Mon, 21 May 2012 11:52:32 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015569</guid><description><![CDATA[ <p>Jon, appreciate the video - but please can you guys do text blogs rather than video blogs. Videos are not indexed by search engines, are a mission to skim &quot;view&quot; and can&#39;t be easily watched in a work environment when researching on the fly.</p><p></p><p>thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/theshadow330.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by dmitri_vaganov</title><link>http://www.asp.net/web-api/videos/getting-started/authorization</link><pubDate>Tue, 14 Aug 2012 08:50:05 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016168</guid><description><![CDATA[ <p>I have the following scenario. My customer calls my web api service in java using POST method passing me XML structure as an input parameter. See below:</p><p></p><p> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</p><p>&lt;rest-client version=&quot;2.4&quot;&gt;</p><p>&lt;request&gt;</p><p>&lt;http-version&gt;1.1&lt;/http-version&gt;</p><p>&lt;http-follow-redirects&gt;false&lt;/http-follow-redirects&gt;</p><p>&lt;URL&gt;http://XXXXXXXX/getCoupon.do&lt;/URL&gt;</p><p>&lt;method&gt;POST&lt;/method&gt;</p><p>&lt;auth-methods&gt;BASIC&lt;/auth-methods&gt;</p><p>&lt;auth-preemptive&gt;false&lt;/auth-preemptive&gt;</p><p>&lt;auth-username&gt;username&lt;/auth-username&gt;&lt;auth-password&gt;password&lt;/auth-password&gt;</p><p>&lt;body content-type=&quot;application/xml&quot; charset=&quot;UTF-8&quot;&gt;</p><p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;&lt;GetPharmacyNotesRequest&gt;</p><p>&lt;RequestID&gt;TestRequestId1&lt;/RequestID&gt;</p><p>&lt;DocumentID&gt;625&lt;/DocumentID&gt;&lt;/GetPharmacyNotesRequest&gt;</p><p>&lt;/body&gt;</p><p>&lt;/request&gt;</p><p>&lt;/rest-client&gt; </p><p></p><p>My task is to authenticate their username and password against my database before returning anything back. I have tried to figure out how to read auth-username and auth-password parameters but I came up short. Please point me in the right direction.</p><p> </p><p></p><p>Thanks</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/dmitri_vaganov.jpg?forceidenticon=false&amp;dt=635072533200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>