Jump to content

Basic auth requires forbidden HTTP_CUSTOM_HEADER


Solo Mornington
 Share

You are about to reply to a thread that has been inactive for 1570 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi.

I'd really like to use HTTP Basic Authentication to be able to authenticate with a web server using llHTTPRequest(). Read about it here: https://en.wikipedia.org/wiki/Basic_access_authentication It's also RFC 7617: https://tools.ietf.org/html/rfc7617

The basic auth scheme uses the 'Authorization' header, but it's not the only one. Here's a note on it from Mozilla: https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Authentication_schemes

The reason this is an issue is because LSL complains if you try to send a HTTP_CUSTOM_HEADER of 'Authorization'.

Is there any way to get this header unblocked from LSL? Or do I need to write a compatibility layer (meaning: I give up)?

Link to comment
Share on other sites

Well it turns out it's user error, sort of. 🙂

You can copy and paste a string into the LSL editor with a null or tab or whatever. I don't know which it was because I saved over it.

It turns out that this works:

list parameters = [
  HTTP_ACCEPT, "application/json",
  HTTP_CUSTOM_HEADER, "Authorization", "Basic [hash]"
];
  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1570 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...