SetAuthentication (HttpRequest subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (match syntax table to syntax template, tags and edits)
m (1 revision)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Template:HttpRequest:SetAuthentication subtitle}}
{{Template:HttpRequest:SetAuthentication subtitle}}
The <var>SetAuthentication</var> [[Notation conventions for methods#Callable methods|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.
The <var>SetAuthentication</var> [[Notation conventions for methods#Callable functions|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==
==Syntax==

Latest revision as of 19:40, 14 July 2011

Issue username/password credentials (HttpRequest class)

The SetAuthentication 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

httpRequest:SetAuthentication( userID, password, realm)

Syntax terms

httpRequest A previously defined and instantiated HttpRequest object.
userID The user name for the protected area.
password 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.

See also

  • Authentication values created with SetAuthentication are cleared with the RemoveAuthentication method.