keplerproject / wsapi

WSAPI is an API that abstracts the web server from Lua web applications.
http://keplerproject.github.io/wsapi
74 stars 33 forks source link

Access to Authorization http header #46

Closed otsakir closed 4 years ago

otsakir commented 4 years ago

Hello!

This is more an inquiry than an issue, so i can understand if it gets ignored.

I'm trying to implement a basic WSAPI authentication filter that relies on the the Authorization http header. Something that would read the header, and set some sort of state in the env so the WSAPI application can use it. I started from the bare bones wsapi application:

https://github.com/keplerproject/wsapi/blob/master/samples/hello.lua

But it seems that the wsapi_env doesn't contain anything relevant. There is no headers property (that's understood), no REMOTE_USER metavariable, nothing to rely on. I went through the docs and source code. No luck :-(

Any pointers ?

Regards

Orestis

otsakir commented 4 years ago

Nevermind, it seems it's already implemented. I got my answers here:

https://github.com/keplerproject/wsapi_basic_auth

Closing this issue.