2 people following this project (follow)

Project Description
ASP.NET implementation of HTTP authentication (basic scheme only).

Getting started

1. Add a reference to HttpAuthentication.dll or add the NuGet package

2. Configure the HttpModule in web.config (example below is for <system.web>):

<httpModules>
  <add name="HttpAuthentication" 
       type="HttpAuthentication.HttpAuthenticationModule, HttpAuthentication" />
</httpModules>

3. Add some credentials to the web.config:

<authentication>
  <forms>
    <credentials passwordFormat="Clear">
      <user name="Foo" password="Bar" />
    </credentials>
  </forms>
</authentication>

Configuration

When you install the NuGet package, a custom configuration section is added to the <system.web> section in your web.config file. Use this section if you want to add parameters to the outgoing challenge or if you want to support an encoding** other than iso-8859-1:

<httpAuthentication enabled="true" type="Basic" encoding="utf-8">
  <parameters>
    <add name="realm" value="Codeplex" />
  </parameters>
</httpAuthentication>

Please note: this feature (to support encodings other than iso-8859-1) is experimental. It is not currently supported in any browser and may change in the future. See this draft proposal for details.

Last edited Feb 5 at 5:45 PM by michielvoo, version 47