$Web Password: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$Web_Password}}
{{DISPLAYTITLE:$Web_Password}}
<span class="pageSubtitle"><section begin="desc" />Password sent by browser<section end="desc" /></span>
<span class="pageSubtitle">Password sent by browser</span>


<var>$Web_Password</var> returns the password that was sent by the browser in the HTTP user authentication header ("Authentication").
<var>$Web_Password</var> returns the password that was sent by the browser in the HTTP user authentication header ("Authentication").


==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" />%PASSWORD = $Web_Password
<p class="syntax"><span class="term">%password</span> = $Web_Password
<section end="syntax" /></p>
</p>


<var>$Web_Password</var> takes no arguments and returns either a null indicating that the browser sent no password or the password sent by the browser.  
<var>$Web_Password</var> takes no arguments and returns either a null indicating that the browser sent no password or the password sent by the browser.  


<var>$Web_Password</var> can only be used during NEWSESCMD processing. Any other attempt to use <var>$Web_Password</var> will result in request cancellation.  
==Usage notes==
<ul>
<li><var>$Web_Password</var> can only be used during NEWSESCMD processing. Any other attempt to use <var>$Web_Password</var> will result in request cancellation.  


<var>$Web_Password</var> can be used in NEWSESCMD processing to extract a password sent in the HTTP headers and try to use it for a user login via [[$Sir_Login]]. Caution should be used with passwords returned by $Web_Password they shouldn't be stored in GTBL (though by default NEWSESCMD processing clear GTBL when it's done), database files, logged to the audit trail or, worst of all, sent back to the browser.
<li><var>$Web_Password</var> can be used in NEWSESCMD processing to extract a password sent in the HTTP headers and try to use it for a user login via [[$Sir_Login]]. Caution should be used with passwords returned by $Web_Password &#x2014; they shouldn't be stored in GTBL (though by default NEWSESCMD processing clear GTBL when it's done), database files, logged to the audit trail or, worst of all, sent back to the browser.
</ul>


==Example==
The following example from a NEWSESCMD program tries to use the HTTP headers to do a user login:
The following example from a NEWSESCMD program tries to use the HTTP headers to do a user login:
 
<p class="code">%USERID = $Web_User
<p class="code"> %USERID = $Web_User
%PASSWORD = $Web_Password
%PASSWORD = $Web_Password
   
   
%RC = $SIR_LOGIN(%USERID, , %PASSWORD)
%RC = $SIR_LOGIN(%USERID, , %PASSWORD)
IF NOT %RC THEN
IF NOT %RC THEN
STOP
STOP
END IF
END IF
</p>
</p>


See also [[$Web_User]] and [[$Sir_Login]].
==See also==
<ul>
<li><var>[[$Web_User]]</var>
<li><var>[[$Sir_Login]]</var>
</ul>


[[Category:Janus Web Server $functions|$Web_Password]]
[[Category:Janus Web Server $functions|$Web_Password]]

Latest revision as of 21:57, 5 June 2013

Password sent by browser

$Web_Password returns the password that was sent by the browser in the HTTP user authentication header ("Authentication").

Syntax

%password = $Web_Password

$Web_Password takes no arguments and returns either a null indicating that the browser sent no password or the password sent by the browser.

Usage notes

  • $Web_Password can only be used during NEWSESCMD processing. Any other attempt to use $Web_Password will result in request cancellation.
  • $Web_Password can be used in NEWSESCMD processing to extract a password sent in the HTTP headers and try to use it for a user login via $Sir_Login. Caution should be used with passwords returned by $Web_Password — they shouldn't be stored in GTBL (though by default NEWSESCMD processing clear GTBL when it's done), database files, logged to the audit trail or, worst of all, sent back to the browser.

Example

The following example from a NEWSESCMD program tries to use the HTTP headers to do a user login:

%USERID = $Web_User %PASSWORD = $Web_Password %RC = $SIR_LOGIN(%USERID, , %PASSWORD) IF NOT %RC THEN STOP END IF

See also