Skip to content

Commit 0bc45ca

Browse files
committed
Simplest possible readme
1 parent 52fd08a commit 0bc45ca

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### websockets-notifications demo
2+
3+
#### How to set JWK public key to validate jwt tokens
4+
One of the options:
5+
1. By setting the key as an environment variable named `JWT_PUBLIC_KEY`.
6+
2. By placing the key in a file named `jwt_public_key.pem` inside the `secrets` folder in repo root.
7+
8+
If both options are set, the application will not start.

src/app/conf/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Settings(BaseSettings):
1414
WEBSOCKETS_PORT: int
1515
WEBSOCKETS_PATH: str
1616

17-
JWT_PUBLIC_KEY: str = Field(validation_alias=AliasChoices("jwt_public_key", "JWT_PUBLIC_KEY"))
17+
JWT_PUBLIC_KEY: str = Field(validation_alias=AliasChoices("jwt_public_key.pem", "JWT_PUBLIC_KEY"))
1818

1919
DEBUG: bool = False
2020
LOG_LEVEL: Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] = "WARNING"

0 commit comments

Comments
 (0)