Skip to content

Instantly share code, notes, and snippets.

@jmichas
jmichas / FourDigitTokenProvider.cs
Created January 31, 2020 15:47
4 Digit Token Provider For Asp.net Core Identity
using System;
using System.Globalization;
using System.Threading.Tasks;
using Goplay.Id.Models;
using Microsoft.AspNetCore.Identity;
namespace YOURNAMESPAZE
{
public class FourDigitTokenProvider: PhoneNumberTokenProvider<ApplicationUser>
@jmichas
jmichas / gist:46b37235ae2b6058a820
Created October 15, 2014 19:49
Azure Mobile Service Login Controller for Thinktecture IdentityServer v3
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IdentityModel.Protocols.WSTrust;
using System.IdentityModel.Tokens;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Claims;
@jmichas
jmichas / Test Pipeline Class
Last active December 12, 2021 14:57
This gist illustrates a TPL Dataflow Pipeline that branches and the various ways to propagate completion and why some work and some don't.
public class DataflowTestPipeline
{
public TransformBlock<Thing, Thing> MainBlock { get; set; }
public TransformBlock<Thing, Thing> Block1 { get; set; }
public TransformBlock<Thing, Thing> Block2 { get; set; }
public TransformBlock<Thing, Thing> Block3 { get; set; }
public ActionBlock<Thing> EndBlock { get; set; }
public void CreatePipelineSynchronousWithLinkOptions()
{