SetAuthentication (HttpRequest subroutine)

From m204wiki
Revision as of 23:47, 14 June 2011 by JAL (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<section begin=dpl_desc/><section end=dpl_desc/>

This callable method lets you present credentials to a password-protected portion of a website. Such portions of a site are those where the server returns a 401 return code (authentication is required) for a request-for-URL in that portion of the site.

Syntax

%httpreq:SetAuthentication(userid, pw, realm)

Syntax terms

%httpreq An instantiated HTTPRequest object.
userid The user name for the protected area.
pw The password for the protected area.
realm The protected area of the site.

Usage notes

  • Once a SetAuthentication method is issued, the information passed is used to respond to any request to which the server responds with a 401 http status code.
  • The most recent SetAuthentication issued is the one that will be in effect.
  • Authentication values created with SetAuthentication are cleared with the RemoveAuthentication method.