mirror of
https://gitea.phreedom.club/localhost_frssoft/dybr2fedi.git
synced 2024-11-30 07:21:27 +00:00
Fix check auth
This commit is contained in:
parent
008c9d2230
commit
df930ba91d
|
@ -47,9 +47,9 @@ auth_api_get_token()
|
||||||
--data-urlencode "redirect_uri=urn:ietf:wg:oauth:2.0:oob" \
|
--data-urlencode "redirect_uri=urn:ietf:wg:oauth:2.0:oob" \
|
||||||
--data-urlencode 'scope=read write follow' \
|
--data-urlencode 'scope=read write follow' \
|
||||||
--data-urlencode "code=$pass" | jj access_token)
|
--data-urlencode "code=$pass" | jj access_token)
|
||||||
echo > .auth
|
echo > "$basedir"/.auth
|
||||||
chmod 600 .auth
|
chmod 600 "$basedir"/.auth
|
||||||
echo "$token" > .auth
|
echo "$token" > "$basedir"/.auth
|
||||||
}
|
}
|
||||||
|
|
||||||
auth_api_get_token
|
auth_api_get_token
|
||||||
|
|
|
@ -14,9 +14,10 @@ touch $log_sended_articles
|
||||||
|
|
||||||
#[Fedi section]
|
#[Fedi section]
|
||||||
instance_point='https://expired.mentality.rip/api/v1'
|
instance_point='https://expired.mentality.rip/api/v1'
|
||||||
if [ ! -f .auth ]; then
|
if [ ! -f "$basedir"/.auth ]; then
|
||||||
|
export basedir
|
||||||
"$basedir"/auth_helper.sh
|
"$basedir"/auth_helper.sh
|
||||||
if [ ! -f .auth ]; then
|
if [ ! -f "$basedir"/.auth ]; then
|
||||||
echo 'Failed, access denied'
|
echo 'Failed, access denied'
|
||||||
else
|
else
|
||||||
echo 'OK! Success'
|
echo 'OK! Success'
|
||||||
|
|
Loading…
Reference in a new issue