Table of Contents

OIL2 Class Standard.HTTPprotectedDirectory

class Standard . HTTPprotectedDirectory {
inherits from Object;


The HTTPprotectedDirectory class provides a convenient mechanism for administratively protecting sections of the logical document tree using basic HTTP authentication. Objects of this class only live long enough to create an appropriate URLprotectedFile object and then automatically delete themselves. Both "Basic" and "Digest" modes, as specified by RFC 2617, are supported.



HTTPprotectedDirectory:create(string serverName, string dirName, string realm, string userName, string password)

Method Description

The first argument names the site to be affected. The second identifies the selected section of the document tree. The realm argument is information that is normally used by web browsers to identify the site to which users are sending authentication data. By default, "basic" authentication is used; "digest" mode is selected by specifying realm as "digest". The remainder of the arguments either specify the file name of a password database or user name/password pairs. Database file arguments must be prefixed with the "file:" URI scheme specification. User name/password arguments only permit read-only access to data; password files must be used to provide write access (such as PUT or DELETE). See URLprotectedFile:addUser for details.