diff options
| author | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-03-14 00:38:40 +0300 |
|---|---|---|
| committer | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-03-14 00:38:40 +0300 |
| commit | 3644ee980991581594c08ffeca3b4dba2bc2a271 (patch) | |
| tree | 81e4aa701995859580a7b81e34e0717d1e4e842f | |
| parent | b78abb7387d79ea0a8d487f5dc6ecf59b1bdf410 (diff) | |
ib_auth: Move authentication URL to authconfig
Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com>
| -rw-r--r-- | submodules/command_authorize.sh | 2 | ||||
| -rw-r--r-- | units/ib_auth.sh | 6 | ||||
| -rw-r--r-- | units/ib_authconfig.sh | 10 |
3 files changed, 10 insertions, 8 deletions
diff --git a/submodules/command_authorize.sh b/submodules/command_authorize.sh index 91cbe46..726b3ea 100644 --- a/submodules/command_authorize.sh +++ b/submodules/command_authorize.sh @@ -35,7 +35,7 @@ fi if [ -z "${output_text}" ] then - if [ -n "${ib_noverify}" ] + if [ -n "${ib_noauth}" ] then output_text="Authorization cannot be verified, make sure you provided the correct credentials" else diff --git a/units/ib_auth.sh b/units/ib_auth.sh index 6883131..47719bf 100644 --- a/units/ib_auth.sh +++ b/units/ib_auth.sh @@ -41,7 +41,7 @@ case "${ib_board}" in --silent \ --user "${ib_login}:${ib_key}" \ --user-agent "Sekoohaka" \ - "https://danbooru.donmai.us/profile.json" + "${ib_auth}" then output_text="Failed to process request" return 0 @@ -98,7 +98,7 @@ case "${ib_board}" in --request POST \ --silent \ --user-agent "Sekoohaka" \ - "https://sankakuapi.com/auth/token" + "${ib_auth}" then output_text="Failed to process request" return 0 @@ -130,7 +130,7 @@ case "${ib_board}" in --proxy "${external_proxy}" \ --silent \ --user-agent "Sekoohaka" \ - "${ib_auth}/user.json" + "${ib_auth}" then output_text="Failed to process request" return 0 diff --git a/units/ib_authconfig.sh b/units/ib_authconfig.sh index 6ffcc38..9fdf519 100644 --- a/units/ib_authconfig.sh +++ b/units/ib_authconfig.sh @@ -4,6 +4,7 @@ case "${ib_board}" in (d) + ib_auth="https://danbooru.donmai.us/profile.json" ib_config="${config}/${user_id}/danbooru" ib_authorization="Authorization: Baisc" ib_login_file="login" @@ -12,22 +13,23 @@ case "${ib_board}" in ib_key_word="API key" ;; (g) + ib_noauth=0 ib_config="${config}/${user_id}/gelbooru" - ib_noverify=0 ib_login_file="user_id" ib_key_file="api_key" ib_login_word="user ID" ib_key_word="API key" ;; (i) + ib_noauth=0 ib_config="${config}/${user_id}/idol" - ib_noverify=0 ib_login_file="login" ib_key_file="password" ib_login_word="login" ib_key_word="password" ;; (s) + ib_auth="https://sankakuapi.com/auth/token" ib_config="${config}/${user_id}/sankaku" ib_authorization="Authorization: Bearer" ib_expire=36000 @@ -39,11 +41,11 @@ case "${ib_board}" in (k|y) case "${ib_board}" in (k) - ib_auth="https://konachan.com" + ib_auth="https://konachan.com/user.json" ib_config="${config}/${user_id}/konachan" ;; (y) - ib_auth="https://yande.re" + ib_auth="https://yande.re/user.json" ib_config="${config}/${user_id}/yandere" ;; esac |
