ClintHeyer.Httpd
Class RemoteHostLock

Authenticates based on remote hostname/IP address.

Field Summary
bool exact
bool isHostMask
string mask

Fields inherited from class ClintHeyer.Httpd.Lock
scheme

Constructor Summary
RemoteHostLock(string mask, bool isHostMask)
         Constructor. Uses substring matching
RemoteHostLock(string mask, bool isHostMask, bool exactMatch)
         Constructor. Mask must match exactly

Method Summary
string GetAuthString(ClintHeyer.Httpd.HttpRequest request)
         Get authentication string for user
bool Unlock(ClintHeyer.Httpd.HttpRequest request, object key)
         Unlocks a resource with this lock

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

exact

private bool exact


isHostMask

private bool isHostMask


mask

private string mask

Constructor Detail

RemoteHostLock

public RemoteHostLock(string mask,
                      bool isHostMask)

Constructor. Uses substring matching

Parameters:
mask - Substring (either IP or hostname) to look for
isHostMask - Set to true if mask is a hostname

RemoteHostLock

public RemoteHostLock(string mask,
                      bool isHostMask,
                      bool exactMatch)

Constructor. Mask must match exactly

Parameters:
mask - Substring (either IP or hostname) to look for
isHostMask - Set to true if mask is a hostname
exactMatch - Set true if only exact strings should match
Method Detail

GetAuthString

public string GetAuthString(ClintHeyer.Httpd.HttpRequest request)

Get authentication string for user

Parameters:
request -
Returns:

Unlock

public bool Unlock(ClintHeyer.Httpd.HttpRequest request,
                   object key)

Unlocks a resource with this lock

Parameters:
request - Request
key - Key
Returns:
True if unlocked