Skip to main content

Simple Authenticator

Project description

authwert

Simple Authenticator

usage: authwert [-h] [--domain DOMAIN] [--rootpath ROOTPATH] [--buildver BUILDVER] 
                [--addr ADDR] [--port PORT] [--logdir LOGDIR] [--logfile LOGFILE] 
                [--verbose] [--debug DEBUG] [--cookieid COOKIEID] [--userinf USERINF] 
                [--scheme SCHEME] [--authfile AUTHFILE] [--authparams AUTHPARAMS] 
                [--prvkey PRVKEY] [--exptime EXPTIME] [--expstr EXPSTR] 
                [--userlist USERLIST] [--algorithm ALGORITHM]

options:
  -h, --help            show this help message and exit
  --domain DOMAIN, -d DOMAIN
                        Domain name
  --rootpath ROOTPATH, -r ROOTPATH
                        Root Path
  --buildver BUILDVER, -b BUILDVER
                        Build Version
  --addr ADDR, -a ADDR  Server address
  --port PORT, -p PORT  Server port
  --logdir LOGDIR, -l LOGDIR
                        Default log directory
  --logfile LOGFILE, -L LOGFILE
                        Default log directory
  --verbose, -V         Verbose mode
  --debug DEBUG, -D DEBUG
                        Debug site
  --cookieid COOKIEID, -k COOKIEID
                        cookieid
  --userinf USERINF, -u USERINF
                        User information
  --scheme SCHEME, -s SCHEME
                        Network Scheme
  --authfile AUTHFILE   Python authorize file
  --authparams AUTHPARAMS
                        Parameters to pass to auth file
  --prvkey PRVKEY       File containing private key to sign JWT tokens
  --exptime EXPTIME     Login expire time in seconds
  --expstr EXPSTR       Login expire time as string
  --userlist USERLIST   Set to always maintain an internal list of active users
  --algorithm ALGORITHM
                        Private key algorithm

Table of contents

 


Install

$ pip3 install authwert

 


Examples

Local test

    authwert \
        --domain=localhost \
        --cookieid="cdec0879-3f2e-48bc-8ecd-92082cbd0639" \
        --scheme=http \
        --userinf='{"admin" : {"password": "secret"}}'

Static user list (please don't deploy this)

    authwert \
        --domain="<domain-for-cookie>" \
        --rootpath="https://<domain-name>/auth" \
        --cookieid="cdec0879-3f2e-48bc-8ecd-92082cbd0639" \
        --userinf='{"admin" : {"password": "secretAdminPassword"}}'

    # OR

    authwert \
        --domain="<domain-for-cookie>" \
        --rootpath="https://<domain-name>/auth" \
        --cookieid="cdec0879-3f2e-48bc-8ecd-92082cbd0639" \
        --userinf='/path/to/json/userlist'

Wordpress integration

    authwert \
        --domain="<domain-for-cookie>" \
        --rootpath="https://<domain-name>/auth" \
        --cookieid="cdec0879-3f2e-48bc-8ecd-92082cbd0639" \
        --authfile="!/etc/auth-example-wordpress.py" \
        --authparams="mariadb://user:pass@localhost/wordpress"

 


References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

authwert-0.1.8.tar.gz (12.4 kB view details)

Uploaded Source

File details

Details for the file authwert-0.1.8.tar.gz.

File metadata

  • Download URL: authwert-0.1.8.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for authwert-0.1.8.tar.gz
Algorithm Hash digest
SHA256 e8a618c38b594bc88635759dfa8fd38e53f56ed91aac6b5a13faa8b153202092
MD5 370726b45f624697225cae437068898e
BLAKE2b-256 e18e655c279beade1cf4f186c8d69f9903aee672eb5d6067311cf58bf27452f4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page