Skip to content

Commit

Permalink
Configuration Parameters Documented
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGrubba committed Jun 24, 2024
1 parent 8c6853b commit 7066dba
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
- ⚠️ Make sure to always have a backup of your user data.

> [!NOTE]
> You can find the Documentation [here](https://johngrubba.github.io/ezauth/)
> You can find the Documentation <a href="https://johngrubba.github.io/ezauth/" target="_blank">here</a>
6 changes: 3 additions & 3 deletions config/configtemplate.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"signup": {
"enable_confirmation_email": true,
"confirmation_code_expires_minutes": 5,
"enable_conf_email": false,
"conf_code_expiry": 5,
"enable_welcome_email": true
},
"email": {
"login_usr": "",
"login_pswd": "",
"login_pwd": "",
"sender_email": "",
"smtp_host": "",
"smtp_port": 465
Expand Down
30 changes: 29 additions & 1 deletion docs/getting-started/configuration.md
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
# Configuration
# Configuration

To configure EZAuth you can take a look at the `configtemplate.json` file in the `config` directory. This file contains all the configuration options for EZAuth.

## Parameters table

All configuration parameters are listed in the tables below.
Make sure that all parameters are set correctly before starting the service.

### Signup Configuration
| Parameter | Description |
|------------|-------------|
| `signup.enable_conf_email` | **Datatype:** Boolean <br> **Default:** `false` <br> Enable or disable the confirmation E-Mail for new users. |
| `signup.conf_code_expiry` | **Datatype:** Integer <br> **Default:** `3600` <br> The time in seconds until the confirmation code expires. |
| `signup.enable_welcome_email` | **Datatype:** Boolean <br> **Default:** `false` <br> Enable or disable the welcome E-Mail for new users. |

### Email Configuration

??? Warning "SMTP SSL required"
EZAuth uses SMTP_SSL to send E-Mails. Make sure that your SMTP server supports SSL.
Currently EZAuth does not support STARTTLS.

| Parameter | Description |
|------------|-------------|
| `email.login_usr` | **Datatype:** String <br> **Default:** `""` <br> E-Mail Login Identifier (mostly the email itself). <br> **Example:** [email protected] |
| `email.login_pwd` | **Datatype:** String <br> **Default:** `""` <br> E-Mail Login Password. |
| `email.sender_email` | **Datatype:** String <br> **Default:** `""` <br> E-Mail address from which the emails are sent (mostly the same as `email.login_usr`) |
| `email.smtp_host` | **Datatype:** String <br> **Default:** `""` <br> SMTP Host for the E-Mail server. <br> **Example:** `smtp.gmail.com` |
| `email.smtp_port` | **Datatype:** Integer <br> **Default:** `465` <br> SMTP Port for the E-Mail server. |
36 changes: 35 additions & 1 deletion docs/getting-started/setup.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
# Setup / Installation
# Setup / Installation

## Install Docker and Docker Compose

To install and use EZAuth you need to have Docker and Docker Compose installed on your system. If you don't have Docker and Docker Compose installed you can follow the official installation guides for [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/).

!!! Info "Docker compose install"
EZAuth documentation assumes the use of Docker desktop (or the docker compose plugin).
While the docker-compose standalone installation still works, it will require changing all `docker compose` commands from `docker compose` to `docker-compose` to work (e.g. `docker compose up -d` will become `docker-compose up -d`).

??? Warning "Docker on windows"
If you just installed docker on a windows system, make sure to reboot your system, otherwise you might encounter unexplainable Problems related to network connectivity to docker containers.

## EZAuth Docker Setup

To install EZAuth you need to clone the repository and perform an initial
configuration. You can do this by running the following commands:


``` bash
# Clone the repository
git clone https://github.com/JohnGrubba/ezauth
cd ezauth
cp config/configtemplate.json config/config.json
```

Then you need to edit the `config/config.json` file to your needs.
For an explanation of the configuration options, see the [Configuration](configuration.md) page.

### Running the service
After you have configured the service you can start it by running the following command:

``` bash
docker compose up -d
```
26 changes: 25 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,28 @@ theme:
primary: blue
toggle:
icon: material/weather-sunny
name: Switch to system preference
name: Switch to system preference
markdown_extensions:
- attr_list
- admonition
- footnotes
- codehilite:
guess_lang: false
- toc:
permalink: true
- pymdownx.arithmatex:
generic: true
- pymdownx.details
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.pathconverter
- pymdownx.smartsymbols
- pymdownx.snippets:
base_path: docs
check_paths: true
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
2 changes: 1 addition & 1 deletion src/tools/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
smtp_host = config["email"]["smtp_host"]
smtp_port = config["email"]["smtp_port"]
username = config["email"]["login_usr"]
password = config["email"]["login_pswd"]
password = config["email"]["login_pwd"]
sender_email = config["email"]["sender_email"]


Expand Down

0 comments on commit 7066dba

Please sign in to comment.