diff options
author | Tim <contact@bytim.eu> | 2025-04-25 22:45:39 +0200 |
---|---|---|
committer | Tim <contact@bytim.eu> | 2025-04-25 22:45:39 +0200 |
commit | fc3fedd9bd55671482c1a9fd77eb0c0acf1aff36 (patch) | |
tree | a30f4983167e71289af599a3cbe96915b965b98f | |
parent | 433d740d56cf2cfaa528249775ac8815c192e829 (diff) | |
download | VPNAuth-fc3fedd9bd55671482c1a9fd77eb0c0acf1aff36.tar.xz VPNAuth-fc3fedd9bd55671482c1a9fd77eb0c0acf1aff36.zip |
Add README.md
-rw-r--r-- | README.md | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..73023ac --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# VPNAuth + +## The idea + +The idea of VPNAuth is that you only need to log into your VPN and from then you get automatically logged into your apps +as you get recognized with your static ip you get assigned from your VPN. + +## Set-up + +I recommend to use the ``flake.nix`` to install the project on NixOS. +VPNAuth will automatically generate the sqlite database and the ``config.json`` in the directory where the process runs +from. + +### The Database + +You need to apply the ef core migrations to create and update the database as VPNAuth needs it. +The recommended way to do that is described +[here](https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/applying?tabs=dotnet-core-cli#sql-scripts). + +### The Config + +Here is an example ``config.json`` with explanations: + +``` JSON +{ + "Users": [ // A list with the user objects. + { + "Username": "tim", // The username of the user. + "Ips": [ // A list with the ips of the user as strings, the server uses them to recognize the user. + "127.0.0.1" + ] + } + ], + "Apps": [ // A list with the app objects that the users can log into. + { + "ClientId": "test-app", // The client id of the app used in the OAuth2 flow. + "RedirectUri": "http://127.0.0.1:8082/api/oauth2-redirect", // The user gets redirected to this uri when they accept or deny the login request. + "Secret": "mysecret", // The app secret used in the OAuth2 flow. + "AllowedUsers": ["tim"] // This key is OPTIONAL - when providden, only the users with their username as a string in that list can log into the app. + } + ] +} +``` + +(Remember that this config is invalid as the JSON standard does not allow comments.) + +You find out how to reach me [here](https://bytim.eu/contact) if you have any questions or feedback. |