| |
browse.develop.com
Browse.develop.com is a community that was established to collect and
organize valuable web information. Our technical staff have selected and
indexed information and courses that they feel will help you stay
current on best practices across the SDLC.
|
47 Articles match "Sample"
See all articles with
"Sample"
| The Latest from www.leastprivilege.com | MORE | | ASP.NET WebAPI Security 5: JavaScript Clients All samples I showed in my last post were in C#. Christian contributed another client sample in some strange language that is supposed to work well in browsers ;). In that scenario we do exactly the same as the samples did in my last post – obtain a token, then use it to call the service. JavaScript client scenarios. There are two fundamental scenarios when it comes to JavaScript clients. The most common is probably that the JS code is originating from the same web application that also contains the web APIs. come to mind. Single page apps often fall in that category. www.leastprivilege.com - Thursday, March 15, 2012 ASP.NET WebAPI Security 4: Examples for various Authentication Scenarios The Thinktecture.IdentityModel.Http repository includes a number of samples for the various authentication scenarios. Stay tuned for more client samples! All the clients follow a basic pattern: Acquire client credential (a single token, multiple tokens, username/password). Call Service. The service simply enumerates the claims it finds on the request and returns them to the client. won’t show that part of the code, but rather focus on the step 1 and 2. Basic Authentication. This is the most basic (pun inteneded) scenario. Simply set username and password and you are good to go. www.leastprivilege.com - Wednesday, March 14, 2012 ASP.NET WebAPI Security 3: Extensible Authentication Framework var config = new AuthenticationConfiguration. {. // sample claims transformation for consultants sample, comment out to see raw claims. You can find the full source code and some samples here. In the next post I will describe some of the samples in the download, and then move on to authorization. In my last post, I described the identity architecture of ASP.NET Web API. The short version was, that Web API (beta 1) does not really have an authentication system on its own, but inherits the client security context from its host. This is fine in many situations (e.g. www.leastprivilege.com - Tuesday, March 13, 2012 | | The Best from www.leastprivilege.com | MORE | | Access Control Service: Passive/Active Transition Sample Here you can find my updated ACS2 sample. In addition to the existing front ends (web [WS-Federation], console [SOAP & REST], Silverlight [REST]) and error handling , it now also includes a WPF client that shows the passive/active transition with a SOAP service as illustrated here. All the ACS interaction is encapsulated in a WPF user control that: retrieves the JSON feed. displays a list of supported identity providers. triggers the sign in via a browser control. retrieves the token response. All you need to supply is the ACS namespace and the realm. Have fun! Azure IdentityModel www.leastprivilege.com - Thursday, June 23, 2011 ASP.NET WebAPI Security 4: Examples for various Authentication Scenarios The Thinktecture.IdentityModel.Http repository includes a number of samples for the various authentication scenarios. Stay tuned for more client samples! All the clients follow a basic pattern: Acquire client credential (a single token, multiple tokens, username/password). Call Service. The service simply enumerates the claims it finds on the request and returns them to the client. won’t show that part of the code, but rather focus on the step 1 and 2. Basic Authentication. This is the most basic (pun inteneded) scenario. Simply set username and password and you are good to go. www.leastprivilege.com - Wednesday, March 14, 2012 ASP.NET WebAPI Security 1: Introducing Thinktecture.IdentityModel.Http Before I start digging into the gory details, all the sample code and concepts I will show are implemented in the newest incarnation of Thinktecture.IdentityModel : https://github.com/thinktecture/Thinktecture.IdentityModel.Http. Over the course of the next posts I will describe the security options you have when writing services using the new ASP.NET WebAPI. Stay tuned! IdentityModel www.leastprivilege.com - Tuesday, March 6, 2012 | - ASP.NET WebAPI Security 3: Extensible Authentication Framework
var config = new AuthenticationConfiguration. {. // sample claims transformation for consultants sample, comment out to see raw claims. You can find the full source code and some samples here. In the next post I will describe some of the samples in the download, and then move on to authorization. In my last post, I described the identity architecture of ASP.NET Web API. The short version was, that Web API (beta 1) does not really have an authentication system on its own, but inherits the client security context from its host. This is fine in many situations (e.g. www.leastprivilege.com - Tuesday, March 13, 2012 - ASP.NET WebAPI Security 5: JavaScript Clients
All samples I showed in my last post were in C#. Christian contributed another client sample in some strange language that is supposed to work well in browsers ;). In that scenario we do exactly the same as the samples did in my last post – obtain a token, then use it to call the service. JavaScript client scenarios. There are two fundamental scenarios when it comes to JavaScript clients. The most common is probably that the JS code is originating from the same web application that also contains the web APIs. come to mind. Single page apps often fall in that category. www.leastprivilege.com - Thursday, March 15, 2012 - Access Control Service: Walkthrough Videos of Web Application, SOAP, REST and Silverlight Integration
Over the weekend I worked a little more on my ACS2 sample. The sample app also exposes a WCF SOAP service. Instead of writing it all down, I decided to quickly record four short videos that cover the relevant features and code. Have fun ;). Part 1 – Overview. This video does a quick walkthrough of the solution and shows the web application part. This includes driving the sign in UI via JavaScript (thanks Matias) as well as the registration logic I wrote about here. watch. Part 2 – SOAP Service and Client. watch. Part 3 – REST Service and Client. But it is working. watch. watch. www.leastprivilege.com - Tuesday, May 24, 2011 - Claims Authorization in Geneva Beta 2 - Introduction
Use this sample authorization manager to inspect the data that gets passed in: class SimpleAuthorizationManager : ClaimsAuthorizationManager. {. The Geneva SDK includes a sample that shows how to use this extensibility point to parse authorization policy (in the Extensibility folder). With this sample you could write something like this for the above authorization statements: < policy resource = " Directory ". I guess you already heard the term “claims based authorization” several times by now. But how exactly does the authorization work? return true ; }. }. www.leastprivilege.com - Friday, July 10, 2009 - Replacing ASP.NET Forms Authentication with WIF Session Authentication (for the better)
The download contains a sample app, the module and an inspector for session cookies and tokens. ASP.NET Forms Authentication and WIF Session Authentication (which has *nothing* to do with ASP.NET sessions) are very similar. Both inspect incoming requests for a special cookie that contains identity information, if that cookie is present it gets validated and if that is successful, the identity information is made available to the application via HttpContext.User/Thread.CurrentPrincipal. The main difference between the two is the identity to cookie serialization engine that sits below. www.leastprivilege.com - Thursday, February 9, 2012 - Access Control Service v2: Registering Web Identities in your Applications [code]
The relevant parts in the sample are: Configuration. You can download the full solution here. use the standard WIF configuration with passive redirect. This kicks automatically in, whenever authorization fails in the application (e.g. when the user tries to get to an area the requires authentication or needs registration). Checking and transforming incoming claims. In the claims authentication manager we have to deal with two situations. Users that are authenticated but not registered, and registered (and authenticated) users. incomingPrincipal.Identity.IsAuthenticated). {. Claims.Add(. www.leastprivilege.com - Saturday, May 21, 2011 - Token based Authentication and Claims for Restful Services
In the next post I will show you how to implement that for WCF – including full source code and samples. WIF as it exists today is optimized for web applications (passive/WS-Federation) and SOAP based services (active/WS-Trust). While there is limited support for WCF WebServiceHost based services (for standard credential types like Windows and Basic), there is no ready to use plumbing for RESTful services that do authentication based on tokens. This is not an oversight from the WIF team, but the REST services security world is currently rapidly changing – and that’s by design. www.leastprivilege.com - Tuesday, November 15, 2011 %>
216 Articles match "Sample"
See all articles with
"Sample"
| The Latest from DevelopMentor | MORE | | Optimistic concurrency in MongoDB using.NET and C# Here’s the download for the source, library with the concurrent data context, and the sample app: MongoDB.Kennedy.zip. 'This article demonstrates a technique and supporting library for adding optimistic concurrency control to NoSQL databases and MongoDB in particular. Quickly, what is optimistic concurrency control? Ideally, all databases that allow concurrent access or disconnected access need to implement some form of concurrency control. This usually comes in two flavors: Pessimistic concurrency control. Optimistic concurrency control. Edit in memory. Nice huh? Conclusion. Michael C. Kennedy's Weblog - Monday, April 8, 2013 Understanding Map - Reduce Running the sample code produces output like this. Quite a few people seem to be intimidated by the concept of Map-Reduce. As it turns out Map-Reduce is actually quite simple and straightforward when you get to understand the basic principle. Basic principle The basic Map-Reduce consists of two steps. guess you are not going to be very surprised when I tell you that these steps are called Map and Reduce. Simple right? And the Reduce process takes the output of the Map process and combines/discards data to produce the result. Again pretty simple right? simple example. 3: public Order(). The Problem Solver - Monday, December 3, 2012 Understanding Map - Reduce Running the sample code produces output like this. Quite a few people seem to be intimidated by the concept of Map-Reduce. As it turns out Map-Reduce is actually quite simple and straightforward when you get to understand the basic principle. Basic principle The basic Map-Reduce consists of two steps. guess you are not going to be very surprised when I tell you that these steps are called Map and Reduce. Simple right? And the Reduce process takes the output of the Map process and combines/discards data to produce the result. Again pretty simple right? simple example. 3: public Order(). The Problem Solver - Monday, December 3, 2012 | -
| The Best from DevelopMentor | MORE | - Access Control Service: Passive/Active Transition Sample
Here you can find my updated ACS2 sample. In addition to the existing front ends (web [WS-Federation], console [SOAP & REST], Silverlight [REST]) and error handling , it now also includes a WPF client that shows the passive/active transition with a SOAP service as illustrated here. All the ACS interaction is encapsulated in a WPF user control that: retrieves the JSON feed. displays a list of supported identity providers. triggers the sign in via a browser control. retrieves the token response. All you need to supply is the ACS namespace and the realm. Have fun! Azure IdentityModel www.leastprivilege.com - Thursday, June 23, 2011 - HTML5 Slides and Samples
The slides and samples from the HTML5 talk I did yesterday at the DevelopMentor office in London. HTML5 from Maurice Beijer Enjoy! Futures HTML5 Modernizr WebSockets WebWorkers Video IE The Problem Solver - Thursday, October 18, 2012 - Download My Web Apps Have HotKeys Too Sample App
and a sample application. I recently blogged about how web apps have hotkeys too. To encourage more developers to add hotkeys to their web applications, I created a jQuery plugin called jQuery.hotKeyMap.js just added a download link for the source code: WebAppsHaveHotKeysTooSample-MichaelKennedy-v1.zip. It’s an ASP.NET MVC 3 web app. Hope you find it useful! Cheers, @mkennedy. Filed under: jQuery Tagged: NET , ASP.NET , MVC , Open Source , Plugins , web. jQuery.NET ASP.NET MVC Open Source Plugins web Michael C. Kennedy's Weblog - Thursday, August 30, 2012 - Simple MVVM Toolkit Improvements: Documentation, Features, Sample Apps
I’ve released a new version of my Simple MVVM Toolkit for Silverlight that has improved documentation, a bunch of new features and additional sample applications. And many of those other toolkits are woefully lacking in the way of documentation and code samples. Sample applications with step-by-step instructions. have spent quite a bit of time fleshing out documentation for the toolkit, and the download includes several sample applications. Other sample apps demonstrate features such as enum lists, associated properties, and async support. Tony and Zuzana's World - Sunday, January 23, 2011 - Online Workflow 4 presentation
Attached are the PowerPoint sheets and samples from my online Window Workflow Foundation 4 presentation today. Let me know if you have any questions. WF4Demo.zip www.TheProblemSolver.nl Wiki.WindowsWorkflowFoundation.eu. The Problem Solver - Tuesday, December 1, 2009 %>
| | |