Skip to content

Instantly share code, notes, and snippets.

{
"name": "ng2a",
"version": "1.0.0",
"dependencies": {
"express": "4.13.4"
},
"engines": {
"node": ">= 4.2.1",
"npm": ">= 3"
}
var express = require('express'),
path = require('path'),
fs = require('fs');
var app = express();
var staticRoot = __dirname + '/';
app.set('port', (process.env.PORT || 3000));
app.use(express.static(staticRoot));
<configuration>
<system.webServer>
<handlers>
<!-- indicates that the app.js file is a node.js application to be handled by the iisnode module -->
<add name="iisnode" path="server.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
@HNeukermans
HNeukermans / gist:d2252e9107ded8d0fb867aef300222f4
Created November 2, 2016 09:44
Azure Signalr MachineKeyProtectionProvider
using Microsoft.Owin.Security.DataProtection;
...
appBuilder.SetDataProtectionProvider(new MachineKeyProtectionProvider());
...
internal class MachineKeyProtectionProvider : IDataProtectionProvider
{
public IDataProtector Create(params string[] purposes)
{
return new MachineKeyDataProtector(purposes);
import { Injectable } from '@angular/core';
import 'expose?AuthenticationContext!../../../node_modules/adal-angular/lib/adal.js';
import { AuthContext } from './authentication.context';
import { Observable, AsyncSubject, BehaviorSubject } from 'rxjs';
let createRawAuthContext: adal.AuthenticationContextStatic = AuthenticationContext;
declare let Logging: adal.Logging;
@Injectable()
export class AuthProvider {