SharePoint.Authentication 1.0.2

dotnet add package SharePoint.Authentication --version 1.0.2                
NuGet\Install-Package SharePoint.Authentication -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharePoint.Authentication" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SharePoint.Authentication --version 1.0.2                
#r "nuget: SharePoint.Authentication, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SharePoint.Authentication as a Cake Addin
#addin nuget:?package=SharePoint.Authentication&version=1.0.2

// Install SharePoint.Authentication as a Cake Tool
#tool nuget:?package=SharePoint.Authentication&version=1.0.2                

SharePoint authentication for modern web apps

SharePoint.Authentication is an inject-able SharePoint context and token helper which can be used in multi-tenant applications. Abilities of this library extended by its sister library SharePoint.Authentication.Owin.

Reason I came up with this project is due to problems I've met while creating high trust multi-tenant application. In the project I've worked on had different client id and secret for each tenant. As you may recall, SharePoint context provider automatically added to web project currently rely on only one client id and secret which must be added to web.config file. This was not the solution I wanted because, application had different client id and secret (provided by seller dashboard) for low trust part of the app and had different client id and secret for each tenant for high trust. To authentication layer to function properly, I wanted it to instantiated per tenant/user and wanted it to inject-able via Unity container. This is the solution I came up with to fix that issue.

Solution I came up consists of two separate libraries, SharePoint.Authentication and SharePoint.Authentication.Owin. First library is the base which I made from token helpers and providers made by Microsoft. Second library made with one specific purpose in mind which is to use SharePoint authentication in MVC or Web API based applications. SharePoint.Authentication contains all the functions you need to build an authentication layer, but if you want don't want to build one yourself, you can use SharePoint.Authentication.Owin.

Please read documentation in project URL for more information.

DISCLAIMER

This library is just an extension for existing code provided by Microsoft. Almost all code here is copied from Microsoft provided authentication and context provider code, I made few changes to work with scenarios described below, but all props goes to engineers who wrote it from scratch.

Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SharePoint.Authentication:

Package Downloads
SharePoint.Authentication.Owin

This is an extension to SharePoint.Authentication library which provides Owin middleware and other tools to make fully SharePoint authentication based web application.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 1,036 4/17/2019
1.0.1 890 4/17/2019
1.0.0 722 4/16/2019

Changes made to cache provider for more flexible implementations.