Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth method refactoring #183

Merged
merged 4 commits into from
Jun 17, 2024
Merged

Auth method refactoring #183

merged 4 commits into from
Jun 17, 2024

Conversation

dyakovri
Copy link
Member

Изменения

Метаклассы AuthMethod перенесены в отдельную папку и разделены на несколько

Детали реализации

Теперь AuthPluginMeta (ex. AuthMethodMeta) – это абстрактный класс минимального плагина аутентификации. Дополнительная функциональность подключается миксинами:

  • LoginMixin – требуется для ручки /login
  • RegisterMixin – требуется для ручки /register
  • UserdataMixin – требуется для работы с кафкой и отправки событий в Userdata API

Check-List

  • Вы проверили свой код перед отправкой запроса?
  • Вы написали тесты к реализованным функциям?
  • Вы не забыли применить форматирование black и isort для Back-End или Prettier для Front-End?

Copy link

Code Coverage

Coverage Report
FileStmtsMissCoverMissing
auth_backend
   __main__.py330%1–5
   base.py12467%6–9
   exceptions.py39587%32, 47–49, 54
auth_backend/auth_method
   base.py66395%72, 74, 81
   method_mixins.py19289%20, 36
   oauth.py561770%37, 43, 48–53, 57–68, 73, 95–99
   userdata_mixin.py19574%32, 37–40
auth_backend/auth_plugins
   email.py2521494%91, 235, 314, 316, 321, 332–336, 384, 422, 471, 481
   github.py1046339%57–116, 127–171, 178, 183, 189–201
   google.py1126443%65–124, 135–163, 170, 176–180, 184–189, 193–202
   keycloak.py1046240%53–112, 119–162, 169, 174, 180–185
   lkmsu.py1379034%59–111, 126–163, 170, 175, 181–195, 199–236, 240–249
   telegram.py1116145%56–90, 102–120, 127, 133, 143–163, 167–181
   vk.py1288236%71–123, 134–172, 179, 184, 190–207, 214–240
   yandex.py1278335%58–128, 138–176, 184, 190, 196–222
auth_backend/cli
   group.py13130%1–17
   process.py57570%1–73
   scope.py11110%1–15
   user.py20200%1–40
   user_group.py10100%1–18
auth_backend/kafka
   kafka.py532160%31–34, 43–45, 57–60, 73–83, 97, 100, 108, 118
   kafkameta.py10280%10, 14
auth_backend/models
   base.py54591%24–27, 75
   db.py136497%52, 56, 209, 213
   dynamic_settings.py27774%24–31
auth_backend/routes
   base.py26292%20–21
   exc_handlers.py37586%29, 54, 67, 81, 101
   groups.py84396%85, 135, 137
   scopes.py30390%24, 51–52
   user.py863955%51, 53, 55–64, 70–76, 88–108, 149–166
   user_session.py85693%77–86, 115, 117, 175, 182
auth_backend/schemas
   models.py98397%148–150
auth_backend/schemas/types
   scopes.py24675%29–31, 36, 39, 41
auth_backend/utils
   security.py39295%35, 59
   smtp.py771877%76–79, 101–120
   string.py7186%12
   user_session_control.py33197%28
TOTAL241779767% 

Summary

Tests Skipped Failures Errors Time
53 6 💤 0 ❌ 0 🔥 9.481s ⏱️

@dyakovri dyakovri merged commit 9eebb5e into main Jun 17, 2024
2 checks passed
@dyakovri dyakovri deleted the auth_method branch June 17, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants