forked from oyd/Adunatio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mustafa Yontar
73a5820535
|
4 years ago | |
---|---|---|
internal_lib | 4 years ago | |
models | 4 years ago | |
mongo_data_dir | 4 years ago | |
restapi@040adf8aed | 4 years ago | |
scripts | 4 years ago | |
.env.example | 4 years ago | |
.gitignore | 4 years ago | |
.gitmodules | 4 years ago | |
Dockerfile | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
adunatio.md | 4 years ago | |
docker-compose-dev.yaml | 4 years ago | |
docker-compose.yaml | 4 years ago | |
main.py | 4 years ago | |
requirements.txt | 4 years ago |
README.md
Adunatio
Association software by Özgür Yazılım Derneği
Dev install
# clone the repository and get submodules
git clone --recurse-submodules git@git.oyd.org.tr:oyd/Adunatio.git Adunatio
# Go to project directory
cd Adunatio
# Create a encrytion key
ssh-keygen -t rsa -b 4096 -f ./privkey.pem
# Run all system with docker
docker-compose -f docker-compose-dev.yaml up --build -d
You can access Adunatio from http://localhost:5000/admin
How to use
-
First, You must create a union from here http://localhost:5000/admin/union/
-
Check your union password in logs. With this command, you should see this kind of line in logs
docker-compose -f docker-compose-dev.yaml logs web
...
...
[2021-02-04 20:39:16,685] INFO in Union: New union password : <PASSWORD>
...
- login with your union and get your Berear token. Your username is combination of your
Legal Registration Number
and@root
# Example Request with curl
curl --request POST \
--url http://localhost:5000/auth/login \
--header 'Content-Type: application/json' \
--data '{
"username":"<Legal Registration Number>@root",
"password":"<PASSWORD>"
}'
# Response
{
"access_token": "<Your Access Token>",
"status": true
}
- Test avaliable endpoints with your Berear token. Note that, header title must be
Adunation_Session_Token
export ACCESS="<Your Access Token>"
curl -H "Adunation_Session_Token: Bearer $ACCESS" http://localhost:5000/api/user/
curl -H "Adunation_Session_Token: Bearer $ACCESS" http://localhost:5000/api/union/
License
Copyright (C) 2021 Özgür Yazılım Derneği
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.