Skip to Content
Mastering Flask Web Development - Second Edition
book

Mastering Flask Web Development - Second Edition

by Daniel Gaspar, Jack Stouffer
October 2018
Intermediate to advanced
332 pages
8h 9m
English
Packt Publishing
Content preview from Mastering Flask Web Development - Second Edition

Remote-user authentication

We can, with some intranet setups, use single sign-on authentication methods, where the web servers do all the heavy lifting related with security. This can be done using IIS integrated windows authentication or Apache mod_auth_sspi, Apache Samba, or others. The setup is beyond the scope of this book.

You can check out some examples of how to set up this kind of authentication with Apache Samba at https://wiki.samba.org/index.php/Authenticating_Apache_against_Active_Directory.

With this kind of authentication method, the web server will pass the already authenticated username as an environment key to the WSGI (web server gateway interface), so we just have to fetch it using the following:

 username = request.environ.get( ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flask Web Development, 2nd Edition

Flask Web Development, 2nd Edition

Miguel Grinberg
Flask Web Development

Flask Web Development

Miguel Grinberg

Publisher Resources

ISBN: 9781788995405Supplemental Content