1
0
bot/test/refresh.zsh
syui 7b03adda1f
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
v0.1
2024-03-05 04:09:43 +09:00

12 lines
319 B
Bash
Executable File

function refresh(){
token=`cat $cfg.t|jq -r .accessJwt`
refresh=`cat $cfg.t|jq -r .refreshJwt`
if [ ! -f $cfg ];then
token
fi
url=https://$host/xrpc/com.atproto.server.refreshSession
j=`curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $refresh" $url`
echo $j
echo $j >! $cfg.t
}