Skip to content

Instantly share code, notes, and snippets.

View rbrayb's full-sized avatar

rbrayb rbrayb

View GitHub Profile
@rbrayb
rbrayb / ADFS Ignite_postman_collection_confidential.json
Created October 12, 2016 22:26
Postman collection for confidential client via ADFS 4.0 and OpenID Connect / OAuth 2.0
{
"variables": [],
"info": {
"name": "ADFS Public - Confidential",
"_postman_id": "4c0d0604-58e6-35b6-50bc-51c69d779f39",
"description": "Confidential code flow.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@rbrayb
rbrayb / gist:76c08052bb77c94d6bebffd20849d6da
Created November 8, 2016 19:08
Postman Authorisation Code Grant with ADFS on Server 2016 to default web API
{
"variables": [],
"info": {
"name": "ADFS My IIS",
"_postman_id": "f2145f47-b93d-b35a-5707-c115e866bf2b",
"description": "Auth code flow.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@rbrayb
rbrayb / index.js
Created January 9, 2018 00:13
ADFS - Cordova
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@rbrayb
rbrayb / Helper.cs
Created January 14, 2018 23:45
Validating an ADFS JWT token
using System;
using System.Threading;
using System.Threading.Tasks;
namespace ValidateJWTConsoleApp
{
class Helper
{
internal static class AsyncHelper
{
@rbrayb
rbrayb / IDP Comparison.csv
Created February 15, 2018 22:37
IDP Comparison
Functions Azure AD Azure AD B2C ADFS 3.0 ADFS 4.0 identityserver Auth0
Authenticate against Azure AD Azure AD (but different tenant type to AAD) AD AD LDAP v3.0 In Memory ASP.NET Identity Membership Reboot (Interface can be extended to any repository) AD SQL DB Auth0 repository
@rbrayb
rbrayb / ADFS Public Gist.postman_collection.json
Created March 25, 2018 19:50
ADFS Postman script to show UserInfo call
{
"variables": [],
"info": {
"name": "ADFS Public Gist",
"_postman_id": "98eded09-3ecd-7239-9cf4-a6da2c92809e",
"description": "Auth code flow.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@rbrayb
rbrayb / Contact.cshtml
Created April 9, 2018 02:15
Displaying claims in an ASP.NET MVC application
@*Replace existing code with ...*@
@{
ViewBag.Title = "User Claims";
}
<h2>Welcome: @ViewBag.ClaimsIdentity.Name</h2>
<h3>Values from Identity</h3>
<table>
<tr>
@rbrayb
rbrayb / GAB.md
Last active April 21, 2018 01:45
Global Azure Bootcamp 2018
@rbrayb
rbrayb / ADFS-JWT.json
Created April 26, 2018 19:20
Get an ADFS 2016 JWT token
{
"variables": [],
"info": {
"name": "ADFS Get a JWT",
"_postman_id": "3387aed8-7c33-0d50-20ce-596492f661a5",
"description": "Auth code flow.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@rbrayb
rbrayb / CNGRSA.cs
Created July 26, 2018 01:13
C# CNG library
using System;
using System.Security.Cryptography;
namespace CNGMediumConsoleApp
{
class Program
{
static byte[] data = {0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
static byte[] privateKey;