Skip to content

Instantly share code, notes, and snippets.

View davidathompson's full-sized avatar

David Thompson davidathompson

View GitHub Profile
@davidfowl
davidfowl / Global.asax.cs
Last active May 11, 2024 02:04
ASP.NET MVC and ServiceCollection sample
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Microsoft.Extensions.DependencyInjection;
using WebApplication16;
using WebApplication16.Controllers;
@Delaire
Delaire / CoreTools.cs
Last active April 17, 2023 20:51
UWP, C# - Retrieve the redirect url using HttpClient from the Headers of the Response - [HttpClient,C#]
public static class CoreTools
{
public static async Task<string> GetRedirectedUrl(string url)
{
//this allows you to set the settings so that we can get the redirect url
var handler = new HttpClientHandler()
{
AllowAutoRedirect = false
};
string redirectedUrl = null;
@jawadatgithub
jawadatgithub / OIDC and OAuth2 Flows.md
Last active February 11, 2024 23:15
Enrich IdentityServer3 Documentation with OIDC (OpenID Connect) and OAuth2 Flows section
Note for community:

A. IdentityServer3 docs, samples and source code use OIDC & OAuth2 terms interchangeably to refer to same thing in many areas. I think that's make sense because OIDC introduced as complement & extension for OAuth2.

B. IdentityServer3, STS, OP, OIDC server, OAuth2 server, CSP, IDP and others: means same thing (software that provide/issue tokens to clients) as explained in [Terminology] (http://identityserver.github.io/Documentation/docs/overview/terminology.html).

C. Grants and flows mean same thing, grant was the common term in OAuth2 specs and flow is the common term in OIDC specs.

D. This document will not focus on custom flow/grant.

E. [Important] Choosing wrong flow leads to security threat.