BasicAuthForWebAPI 2.0.0

Provides easy implementation for Basic HTTP authentication in an ASP.NET Web API project.

Install-Package BasicAuthForWebAPI -Version 2.0.0
dotnet add package BasicAuthForWebAPI --version 2.0.0
<PackageReference Include="BasicAuthForWebAPI" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BasicAuthForWebAPI --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

By default, will use the ASP.NET Membership Provider (https://msdn.microsoft.com/en-us/library/yh26yfzy(v=VS.100).aspx). But you can modify and extend this behavior in either or both of the following ways:
     - Pass your own IMembershipProvider to the BasicAuthenticationMessageHandler constructor
     - Set the GetAdditionalClaims property to a Func that returns a collection of System.Security.Claims.Claim objects
     - Set the IssueChallengeResponse to true to allow only authenticated callers and tell browsers to prompt for credentials

     To configure this module, place the following line somewhere in your startup code - e.g. the Register() method in /app_start/WebApiConfig.cs:

         GlobalConfiguration.Configuration.MessageHandlers.Add(new BasicAuthenticationMessageHandler());

     And then make sure you use the [Authorize] attribute to protect your controllers and their actions - either with a global filter or on individual controllers and actions.

     Please see the project site for more details.

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.0 12,701 10/26/2013
1.0.4 871 5/21/2013
1.0.3 610 5/21/2013
1.0.2 615 5/21/2013
1.0.1 614 5/21/2013