Skip to content

Instantly share code, notes, and snippets.

View stonetip's full-sized avatar

Jon Nehring stonetip

View GitHub Profile
@stonetip
stonetip / index.html
Created February 18, 2015 17:12
zxWwOM
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<div id="timerDiv" class="timerDiv">123</div>
<input id="triggerTimer" type="button" value="timer" />
@stonetip
stonetip / TokenValidationHandler.cs
Last active August 29, 2015 13:55
JWT token validation class
internal class TokenValidationHandler : DelegatingHandler
{
// This function retrieves ACS token (in format of OAuth 2.0 Bearer Token type) from
// the Authorization header in the incoming HTTP request from the client.
private static bool TryRetrieveToken(HttpRequestMessage request, out string token)
{
try
{
token = null;
IEnumerable<string> authHeaders;