GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dmarlow/AspNetTicketBridge: Decrypts MachineKey protected AuthenticationTicket objects created by ASP.NET to be used in ASP.NET Core.

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
test/AspNetTicketBridge.Tests
test/AspNetTicketBridge.Tests
 
 
.gitignore
.gitignore
 
 
AspNetTicketBridge.sln
AspNetTicketBridge.sln
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

AspNetTicketBridge

Decrypts MachineKey protected AuthenticationTicket objects created by ASP.NET to be used in ASP.NET Core.

This MachineKey decryptor uses HMACSHA1 and AES with the decryptionKey and validationKey from your web.config to decrypt OAuth tokens generated from OWIN.

<machineKey compatibilityMode="Framework45" decryption="AES" decryptionKey="....." validation="SHA1" validationKey="....." />

Example

string validationKey = "<value from old web.config/machineKey/validationKey>";
string decryptionKey = "<value from old web.config/machineKey/decryptionKey>";

// Decrypt the token
var ticket = MachineKeyTicketUnprotector.UnprotectOAuthToken(token, decryptionKey, validationKey);

// The ticket is in v3 format and needs to be converted to v5 (ASP.NET Core 2.0).
// Can use whatever you want for AuthScheme
var newTicket = AuthenticationTicketConverter.Convert(ticket, AuthScheme);

// If using a custom AuthenticationHandler, you can return the new ticket 
// in the HandleAuthenticateAsync method.
var result = AuthenticateResult.Success(newTicket);

Special thanks for Umar Karimabadi for doing all of the heavy lifting. For more information, see here: https://stackoverflow.com/questions/46546254/using-machine-keys-for-idataprotector-asp-net-core

About

Decrypts MachineKey protected AuthenticationTicket objects created by ASP.NET to be used in ASP.NET Core.

Topics

asp-netasp-net-coreencryptionsecurity

Resources

Readme
MIT license
Activity

Stars

36 stars

Watchers

5 watching

Forks

14 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.