UniversalLoginModule

Allows an entire site to be protected behind a password. Useful for protecting test sites from public view and search engines indexing. It is not meant to secure a website with sensitive data.

How to use

Add the UniversalLoginModule to the list of modules in Web.config:

<configuration>
	<system.webServer>
		<modules>
			<add name="UniversalLoginModule" type="SharpNick.UniversalLoginModule, SharpNick" />
		</modules>
	</system.webServer>
</configuration>
Configure the module:

<sharpNick>
	<universalLogin
		cookieName="name"
		cookieAuthValue="some random string"
		password="your password"
		validDays="365"
		enable="true"
	/>
</sharpNick>
An explanation of the attributes:

Attribute Description Default value
cookieName Name of the authentication cookie UnLogAuth
cookieAuthValue Value to insert into the authentication cookie. You can change this value to invalidate all previously authenticated users and force them to log in again n/a
password The password used to authenticate the user n/a
validDays Number of days the authentication is valid for 365
enable Whether to enable this module true

(see the configuration reference on how to use the <sharpNick> node)

Last edited Jun 12, 2012 at 7:05 PM by weiwong, version 2

Comments

No comments yet.