Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Looking for inspiration

Tomasz Pęczek tpeczek

:octocat:
Looking for inspiration
View GitHub Profile
@tpeczek
tpeczek / JwtBearerMultipleJwaExtensions.cs
Last active May 27, 2018
Supporting multiple JWA and ES256 in ASP.​NET Core JWT bearer authentication
View JwtBearerMultipleJwaExtensions.cs
using System;
using System.Text;
using System.Security.Cryptography;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
namespace Microsoft.Extensions.DependencyInjection
{
public static class JwtBearerMultipleJwaExtensions
@tpeczek
tpeczek / CloudFlareConnectingIpExtensions.cs
Last active Oct 22, 2020
ASP.NET Core middleware for CloudFlare Connecting IP support
View CloudFlareConnectingIpExtensions.cs
using System;
using Microsoft.Extensions.Options;
using Microsoft.AspNetCore.HttpOverrides;
using Lib.AspNetCore.CloudFlareConnectingIp;
namespace Microsoft.AspNetCore.Builder
{
public static class CloudFlareConnectingIpExtensions
{
public static IApplicationBuilder UseCloudFlareConnectingIp(this IApplicationBuilder app)
@tpeczek
tpeczek / PostTunnelingMiddleware.cs
Created Dec 7, 2017
ASP.NET Core middleware for POST Tunneling support
View PostTunnelingMiddleware.cs
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
namespace Demo.AspNetCore.PostTunneling.Middlewares
{
public class PostTunnelingMiddleware
@tpeczek
tpeczek / SslAccelerationMiddleware.cs
Created Sep 7, 2017
ASP.NET Core middleware for SSL Acceleration (Offloading) support
View SslAccelerationMiddleware.cs
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Options;
namespace Demo.AspNetCore.SslAcceleration.Middlewares
{
public class SslAccelerationOptions
You can’t perform that action at this time.