mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-27 02:47:33 +00:00
feat: Add admin command to issue access tokens
This commit is contained in:
1 parent
4cf743883a
commit
9a3496ae70
12 files changed
+79
-58
No files matched your search
@@ -3,7 +3,7 @@ use futures::StreamExt;
|
||||
use service::registration_tokens::TokenExpires;
|
||||
|
||||
impl crate::Context<'_> {
|
||||
pub(super) async fn issue_token(&self, expires: super::TokenExpires) -> Result {
|
||||
pub(super) async fn issue_registration_token(&self, expires: super::TokenExpires) -> Result {
|
||||
let expires = {
|
||||
if expires.immortal {
|
||||
None
|
||||
|
||||
@@ -10,7 +10,7 @@ use crate::admin_command_dispatch;
|
||||
pub enum TokenCommand {
|
||||
/// Issue a new registration token
|
||||
#[clap(name = "issue")]
|
||||
IssueToken {
|
||||
IssueRegistrationToken {
|
||||
/// When this token will expire.
|
||||
#[command(flatten)]
|
||||
expires: TokenExpires,
|
||||
|
||||
Reference in new issue
Block a user