feat: revamp authentication -- remove twitch's tokens from our own wrapper token
This commit is contained in:
parent
3186afe96d
commit
50900986fa
31 changed files with 736 additions and 155 deletions
|
|
@ -8,11 +8,14 @@ from litestar.template import TemplateConfig
|
|||
|
||||
from src.huesoporro.api.dependencies import (
|
||||
authenticate,
|
||||
get_authenticate_action,
|
||||
get_authenticator,
|
||||
get_chatbot_settings_svc,
|
||||
get_code_authenticator_svc,
|
||||
get_db,
|
||||
get_get_user_by_jwt_action,
|
||||
get_sentences_svc,
|
||||
get_settings,
|
||||
get_user_repo,
|
||||
store_chatbot_settings_svc,
|
||||
)
|
||||
from src.huesoporro.api.errors import (
|
||||
|
|
@ -24,10 +27,12 @@ from src.huesoporro.api.routes.api import (
|
|||
get_bot_settings,
|
||||
get_bot_status,
|
||||
get_index,
|
||||
get_sentences,
|
||||
get_tts_overlay,
|
||||
get_tts_permalink,
|
||||
manage_bot,
|
||||
save_bot_settings,
|
||||
save_new_sentence,
|
||||
)
|
||||
from src.huesoporro.api.routes.auth import get_code, login
|
||||
from src.huesoporro.bot import BotsManager
|
||||
|
|
@ -52,6 +57,8 @@ def create_app():
|
|||
get_bot_status,
|
||||
save_bot_settings,
|
||||
get_bot_settings,
|
||||
get_sentences,
|
||||
save_new_sentence,
|
||||
],
|
||||
static_files_config=(
|
||||
StaticFilesConfig(
|
||||
|
|
@ -77,10 +84,14 @@ def create_app():
|
|||
"a": Provide(get_authenticator, use_cache=True),
|
||||
"user": Provide(authenticate),
|
||||
"db": Provide(get_db, use_cache=True),
|
||||
"code_authenticator_svc": Provide(get_code_authenticator_svc),
|
||||
"bm": Provide(BotsManager, use_cache=True),
|
||||
"gbs": Provide(get_chatbot_settings_svc),
|
||||
"sbs": Provide(store_chatbot_settings_svc),
|
||||
"sgs": Provide(get_sentences_svc),
|
||||
"authenticator": Provide(get_authenticator),
|
||||
"authenticate_action": Provide(get_authenticate_action),
|
||||
"user_repo": Provide(get_user_repo),
|
||||
"get_user_by_jwt_action": Provide(get_get_user_by_jwt_action),
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue