![]() |
|
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
MIVA® RESOURCES: Authorization with MvCALL
Calling password protected URLs with MivaRecent versions of Miva (up to 3.76, as for now) do not support HTTP authentication and therefore it is normally not possible to access any password protected pages with Miva MvCALL (I mean HTTP authorization password protection). The basic HTTP authorization uses simple and insecure base-64 encoding algorithm to transmit the username and the password to the server. Base-64 encoding is used also for encoding binary files into e-mail attachments. If you have installed MimeConv 2.0 on your system, you can use this program for passing the authorization data through MvCALL and process the password-protected pages by your Miva script. The BasicAuth function and a sample callI wrote a short function that returns a string to be used as a MvCALL URL argument for password protected documents: Be sure to install the MimeConv application before testing the function. The function would be used in MvCALL in the following way: <MvCALL
Basic Authorization is the most usual authorization, so the function should work in the vast majority of cases. However, other types of authentication with a securer encoding may be required by some servers. Most of the encryptions could be written in Miva as well. If you do not want or cannot install MimeConv on your system, you can encode the user name and password in another way (e.g. locally on your workstation using the Windows version of MimeConv, using another base-64 encoder, sending as binary attachment or looking at the HTTP headers sent by your browser). The string to be encoded, has to be in this form: username:password
Once you have the base-64 encoded strign, you can pass it to the server in this way: <MvASSIGN NAME="l.crlf" VALUE="{asciichar(13) $ asciichar(10)}">
Some Useful LinksMivo: MimeConv 2.0Mivo: Changing HTTP headers in MvCALL HTTP Authentication: Basic and Digest Access Authentication RFC2616 (HTTP/1.1): Authorization List of RFC's RFC-1945: Hypertext Transfer Protocol - HTTP/1.0 RFC-2068: Hypertext Transfer Protocol - HTTP/1.1 (obsolate) RFC-2616: Hypertext Transfer Protocol - HTTP/1.1 RFC Editor Search the RFC Database |
||||||||||
|
Miva and some other terms used on this page are registerd trademarks of the Miva Corporation |