From 58ac2bdfb480a401aeb042e9621a40905a02aa68 Mon Sep 17 00:00:00 2001 From: Craig Davis Date: Wed, 22 Jun 2016 08:49:06 -0500 Subject: [PATCH] Adding notes about using auth_by_pam in api context. --- README.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.rst b/README.rst index 5cf203a..c0ad610 100644 --- a/README.rst +++ b/README.rst @@ -95,6 +95,22 @@ Currently only password-protected uploads are supported! ./pypi-server -p 8080 -P htpasswd.txt ~/packages & +#. Alternate Authentication using PAM: + 'auther' is only avaliable through the api not command line flags. + Example Script: + ``` + from pypiserver import bottle + import pypiserver + from pypiserver.core import auth_by_pam + + kwds = pypiserver.default_config(auther=auth_by_pam, root='/packages') + config = pypiserver.Configuration(**kwds) + app = pypiserver.app(**kwds) + bottle.run(app=app, host=config.host, port=config.port, server=config.server) + ``` +.. Note:: + If you are getting authentication even with incorrect credentials please check your PAM configuration. + #. On client-side, edit or create a `~/.pypirc` file with a similar content:: [distutils]