scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 91 forks source link

Authentication by proxy #177

Closed stephane-martin closed 7 years ago

stephane-martin commented 7 years ago

Hello,

a simple modification to delegate authentication to the upstream reverse proxy.

When in config AUTH_PROXY = True, Realms will look in the HTTP request for header REMOTE_USER (classically used by HTTP servers and SSO). If REMOTE_USER is given, the user is automatically logged in Realms.

I added a bit of documentation in README too.

Please review.

Thanks, Stephane (and I lost 30 minutes to understand that in flask 0.11 is_authenticated is now a property ;))

gazpachoking commented 7 years ago

(and I lost 30 minutes to understand that in flask 0.11 is_authenticated is now a property ;))

Oops, sorry about that. PR merge order added some older flask-login stuff back in there. Fixed now.

stephane-martin commented 7 years ago

rebased

stephane-martin commented 7 years ago

I think I'm doing something wrong with that rebasing stuff... I keep seing changes about the "is_anonymous" vs "is_anonymous()" issue :-/