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.
 
 
Özcan Oğuz 5207e712bf
Fix typo at AuthMethods.py
4 years ago
internal_lib Fix typo at AuthMethods.py 4 years ago
models password fix 4 years ago
mongo_data_dir add gitignore mongo_data_dir 4 years ago
restapi@040adf8aed user creation fix 4 years ago
.env.example Add configuration via .env file 4 years ago
.gitignore Add .env to .gitignore 4 years ago
.gitmodules restapi submodule update 4 years ago
Dockerfile fix custom encrypted field set and get attrs 4 years ago
LICENSE Add AGPL v3 license 4 years ago
README.md update instalation steps and add basic usage of this project 4 years ago
adunatio.md inital 4 years ago
docker-compose-dev.yaml add docker-compose for developers 4 years ago
docker-compose.yaml add docker-compose for developers 4 years ago
main.py Fix typo at AuthMethods.py 4 years ago
requirements.txt Add configuration via .env file 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.