Skip to content

LamArt/Lamart-Lk-Backend

Repository files navigation

Lamart-performance-review

Личный кабинет для ООО "Ламарт" и платформа для performance review

Deploy

  1. Create .env
  2. Run docker
  3. In terminal: docker-compose up --build

Api Docs

After deploying you can find API docs here -> Redoc or Swagger

Development

  1. Create virtualenv
python -m venv [path to venv folder]
  1. Activate virtualenv
source [path to venv folder]/Scripts/activate
  1. Install requirements.
pip install -r requirements/local.txt
  1. Set POSTGRES_HOST="localhost" in .env
  2. Run db
docker-compose up db --build -d
  1. Make migrations, migrate and run server
python manage.py makemigrations
python manage.py migrate
python manage.py runserver

Authentication

API uses bearer JWT authentication, read API docs for more info.

  1. For login or sign up: exchange provider oauth token* to refresh and acess jwt /auth/exchange_token/
  2. Refresh the access token if it's no longer valid by using /auth/refresh/
  3. Refresh token expires after 12 hours, do step 1 to get new.
  • Yandex is the only provider available now.

Atlassian Provider

To connect Jira you need:

  1. Create a new app in Developer Console
  2. Add all permissions with Jira API like read and etc, but no more 50 scopes.
  3. Open "Authorization" in left menu, configure OAuth 2.0
  4. You need to take URL from "Classic Jira platform REST API authorization URL"
  5. Add in your URL new param "offline_access" to the scope parameter, it will be looks like: ' %3Ajira-data-provider%20offline_access&redirect_uri'. You can past it to the right place, all the difference is in the offline access parameter.
  6. After accepting all accesses "code=" param is what you need.
  7. Exchange your authorization code to JWT token by auth/get_token_jira/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages