summaryrefslogtreecommitdiffstats
path: root/adenosine-cli/src/bin/adenosine.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-12-19 20:03:30 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-12-19 20:21:32 -0800
commit0e170f77bae6851602b0c946708c97cfcb4ac3cf (patch)
tree1e6f1e222facb6a97f09359d701797f2347827a0 /adenosine-cli/src/bin/adenosine.rs
parentfa6f37799764e10cec34db1f68d3e71f57a4e86f (diff)
downloadadenosine-0e170f77bae6851602b0c946708c97cfcb4ac3cf.tar.gz
adenosine-0e170f77bae6851602b0c946708c97cfcb4ac3cf.zip
cli: add auth refresh command
Diffstat (limited to 'adenosine-cli/src/bin/adenosine.rs')
-rw-r--r--adenosine-cli/src/bin/adenosine.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/adenosine-cli/src/bin/adenosine.rs b/adenosine-cli/src/bin/adenosine.rs
index 724f412..4c21170 100644
--- a/adenosine-cli/src/bin/adenosine.rs
+++ b/adenosine-cli/src/bin/adenosine.rs
@@ -86,6 +86,8 @@ enum AccountCommand {
#[structopt(long, short)]
password: String,
},
+ /// Refreshes JWT token
+ Refresh,
/// Deletes the current login session
Logout,
/// Fetches account metadata for the current session
@@ -462,6 +464,9 @@ fn run(opt: Opt) -> Result<()> {
})),
)?,
Command::Account {
+ cmd: AccountCommand::Refresh,
+ } => xrpc_client.post(&Nsid::from_str("com.atproto.session.refresh")?, None, None)?,
+ Command::Account {
cmd: AccountCommand::Logout,
} => xrpc_client.post(&Nsid::from_str("com.atproto.session.delete")?, None, None)?,
Command::Account {