It makes sure that the given user name exists at the system
(with a UID > 1000) and that the password corresponds to
-a specific one given in this file.
+the password that is provided by the AuthExternalContext
+directive in the apache configuration.
"""
-
-# Configuration
-PASSWORD = 'hygCithOrs5'
-
-
-# ------------------------------------------------------------
-
import os
import pwd
import sys
# Get provided username and password
username = os.environ.get('USER')
password = os.environ.get('PASS')
+valid_password = os.environ.get('CONTEXT')
# We want to have a existing user ...
# ... and the password has to be as given above
-if password != PASSWORD:
+if password != valid_password:
sys.exit(1)