[sldev] Re: [VWR] Web login without llmozlib

Argent Stonecutter secret.argent at gmail.com
Wed Dec 19 12:25:57 PST 2007


On 2007-12-18, at 15:35, Tess Chu wrote:
> Thanks Robin!
>
> It looks like the code uses curl to post the credentials and parses  
> the response for the web login key.  Patching this into llstartup  
> for building without llmozlib will require a few more steps to  
> work, namely putting back the interface for which the credentials  
> are entered, or adding in command line options.  Can this replace  
> the web service we discussed in prior email threads?

Tess,

That pretty much *is* the web-service API I was referring to. The  
only difference is that I suggested that a successful response should  
be a redirect to the "secondlife:" URI described in the original  
announcement. That allows the normal HTTP response codes to do the  
rest of the job.

> The tricky part here is what to do when login fails.

That's covered in the response codes. HTTP is designed for this  
situation.

Successful login:
     303 Success-message-for-user
     Location: secondlife:...
     Other-headers...

     -- no body ---

Authentication failure:
     403 Failure-message-for-user
     Headers...

     HTML error message

Server failure:
     5xx Message-for-user
     Headers...

     HTML error message

Special handling:
     307 Message-for-user
     Location: URL requesting more information
     Other-headers...

     --- no body ---

The viewer doesn't require any new complex code. No matter what the  
response is, it contains a message to display to the user. If a web  
page display is required, it contains a redirect to that page. The  
client can display that in llMozLib or redirect to an external  
browser. It can even use the existing framework for llLoadURL to give  
the user a dialog approving that redirect.



More information about the SLDev mailing list