]> mj.ucw.cz Git - subauth.git/commitdiff
Server: create_token returns the ident of the new token
authorMartin Mares <mj@ucw.cz>
Sun, 19 Nov 2017 12:47:38 +0000 (13:47 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 19 Nov 2017 12:47:38 +0000 (13:47 +0100)
server/cmd.c

index 98092b4f658289400e51edb6de9ccbdfb993a5f7..8959d078c8d94e52871e5b28c646be9bfbc0d43f 100644 (file)
@@ -267,6 +267,7 @@ static void cmd_create_token(struct client *c)
   struct auth_token *at = auth_create_token(aa);
   char *tok = auth_set_token_generated(at, comment, c->pool);
   set_string(c, c->reply, "token", tok);
+  set_string(c, c->reply, "ident", at->ident);
 
   msg(L_INFO, "Created token: login=<%s> zone=<%s> id=<%s>", aa->user->login, aa->zone->name, at->ident);