Skip to content

Instantly share code, notes, and snippets.

View jessetechie's full-sized avatar

Jesse Hemstad jessetechie

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jessetechie on github.
  • I am jessetechie (https://keybase.io/jessetechie) on keybase.
  • I have a public key ASAvjx1uD7fKjXA8SQnG9bIbzUH00MwC2DisfOYt4qresAo

To claim this, I am signing this object:

@jessetechie
jessetechie / Bootstrapper.cs
Created March 12, 2015 17:09
Accept tokens in querystring or cookies when headers aren't available
public class Bootstrapper : DefaultNancyBootstrapper
{
protected override void RequestStartup(TinyIoCContainer container, IPipelines pipelines, NancyContext context)
{
base.RequestStartup(container, pipelines, context);
TokenAuthentication.Enable(pipelines, new TokenAuthenticationConfiguration(container.Resolve<ITokenizer>()));
pipelines.BeforeRequest.AddItemToStartOfPipeline(TokenHeaderFallback.Hook());
}
}