Passgen is a simple service for generating passwords with guaranteed presence of uppercase and lowercase letters, numbers and special characters.
You can use AJAX to call the passgen API and will receive a randomly generated password in return:
https://passgen.zakharov.cc/api/v1/passwords
The API will provide you with a JSON object that you can parse and apply to your application:
{"password": "6;HgyR"}
If API service experiencing server issues, we'll return a simple JSON object with an error:
{"title": "Invalid parameter", "description": "The \"length\" parameter is invalid. Less than the minimum length 4."}
You can specify a length of generated password by adding the "length" parameter to your request. Valid values for the parameter from 4 to 254. If parameter not specified default values is 6:
https://passgen.zakharov.cc/api/v1/passwords?length=6
You can generate password without punctuation marks by adding the "exclude_punctuation" parameter to your request. Valid values for the parameter: true, on, ok, y, yes, 1:
https://passgen.zakharov.cc/api/v1/passwords?exclude_punctuation=true
You can disable CORS by environment variable:
PASSGEN_CORS_ENABLED=False
Gunicorn settings can be specified by using environment variable GUNICORN_CMD_ARGS. All available command line arguments can be used. For example, to specify the bind address and number of workers:
GUNICORN_CMD_ARGS="--bind=0.0.0.0:8080 --workers=3"
Use docker container:
docker run -d -p 8080:8080 --restart=always --cap-drop=ALL ghcr.io/toolen/passgen:2.2.2