Building OAuth channel for WCF RESTful services

 

What is OAuth?

While OpenID and WS-Federation focus on delegating user identity (or a collection of identity claims), OAuth was designed to address a different and complementary scenario, the delegation of user authorization. In few words, OAuth allows a client application to obtain user consent (i.e. Authorization for consuming a private resource as access tokens) for executing operations over private resources on his behalf.

If you want to know more about how OAuth works, you should read the following posts

OAuth .NET Library

Alex Henderson (Aka Bittercoder) has written a pretty good OAuth library in .NET for implementing an OAuth consumer and service provider. The library is available here under a MIT license (do wherever you want with it), and it is very easy to use. Alex has definitively made a very good work.

OAuth WCF Channel using REST Starter Kit’s RequestInterceptor

WCF channel implementation for OAuth mounts on top of his library and it basically transforms a OAuth token into a .NET security principal that can be used later within the service implementation. The channel is implemented as a RequestInterceptor, one of new features introduced in the REST WCF Starter Kit. This interceptor basically captures the request at channel level and performs all the validations required by OAuth. The following sample illustrates how the interceptors can be plugged into an existing service host (service.svc),

Samples here: OAuth channel for WCF RESTful services – Pablo M. Cibraro (aka Cibrax)

Wix# (WixSharp) – managed interface for WiX

 

Wix# (WixSharp) – managed interface for WiX

By Oleg Shilo

This article describes Wix# (WixSharp), a managed interface to WiX (Windows Installer XML toolset for building Windows installation packages from the XML source code). Wix# allows building a complete MSI or WiX source code by using script files written with the C# syntax. It uses a C# class structure to mimic WiX entities and their relationships in order to produce a valid deployment model.

Diagrams showing MSI Deployment with Visual Studio and directly with WiX

image

image

 

Wix# Overview

The Wix# concept is quite simple. The Wix# source file is an ordinary C# file containing code defining relationships between instances of Wix# classes. Wix# classes represent deployment entities: files, shortcuts, registry values etc. The Wix# source file can be translated by the Wix# engine into the WiX source file, which then (optionally) can be automatically compiled into MSI. 

Sample:

Script for installing MyApp.exe into <ProgramFiles>\My Company\My Product directory; showing a custom license file; creating shortcuts to Install/Uninstall the product and to launch MyApp.exe from <Desktop> and <ProgramMenu>:

using System;

class Script
{
    static public void Main(string[] args)
    {
        var project = new WProject(“MyProduct”,
                          new WDir(@”%ProgramFiles%\My Company\My Product”,
                              new WFile(@”Files\Bin\MyApp.exe”,
                                  new WShortcut(@”%ProgramMenu%\My Company\My Product”),
                                  new WShortcut(@”%Desktop%”)),
                              new WShortcut(“Uninstall MyApp”, “[System64Folder]msiexec.exe”, “/x [ProductCode]“)),
                          new WDir(@”%ProgramMenu%\My Company\My Product”,
                              new WShortcut(“Uninstall MyApp”, “[System64Folder]msiexec.exe”, “/x [ProductCode]“))));
       project.Id = new Guid(“6f330b47-2577-43ad-9095-1861ba25889b”);
       project.LicenceFile = @”AppFiles\License.rtf”;
       WCompiler.BuildMsi(project); }
}

Via CodeProject: Wix# (WixSharp) – managed interface for WiX. Free source code and programming help

Small Basic

 

SmallBasic

Small Basic is a project that’s aimed at bringing “fun” back to programming. By providing a small and easy to learn programming language in a friendly and inviting development environment, Small Basic makes programming a breeze. Ideal for kids and adults alike, Small Basic helps beginners take the first step into the wonderful world of programming.

  • Small Basic derives its inspiration from the original BASIC programming language, and is based on the Microsoft .Net platform. It is really small with just 15 keywords and uses minimal concepts to keep the barrier to entry as low as possible.
  • The Small Basic development environment is simple, yet provides powerful modern environment features like Intellisenseā„¢ and instant context sensitive help.
  • Small Basic allows third-party libraries to be plugged in with ease, making it possible for the community to extend the experience in fun and interesting ways.

Getting Started Guide

Forums

FAQ

Small Basic Blog

Samples

Microsoft Small Basic aims to make computer programming accessible to beginners.

Download

Getting Started

  1. Download and install Small Basic
  2. Follow the Getting Started guide (docx or pdf) to build your first application