From ae08955d6b65c6b1da7c8adbd339240b3e146024 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 20 Apr 2022 13:55:35 +0100 Subject: [PATCH] Implement verification commands --- handler/ux/commands.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/handler/ux/commands.py b/handler/ux/commands.py index 2a583bf..d36e868 100644 --- a/handler/ux/commands.py +++ b/handler/ux/commands.py @@ -915,3 +915,27 @@ class IRCCommands(object): currencies = tx.sinks.currencies tx.markets.distribute_account_details() msg(f"Distributing account details for currencies: {', '.join(currencies)}") + + class authlink(object): + name = "authlink" + authed = True + helptext = "Create a URL for identity verification. Usage: authlink " + + @staticmethod + def run(cmd, spl, length, authed, msg, agora, tx, ux): + if length == 2: + identifier = spl[1] + auth_url = ux.verify.create_applicant_and_get_link(identifier) + msg(f"Verification URL: {auth_url}") + + class checkauth(object): + name = "checkauth" + authed = True + helptext = "Check the authentication for an identifier. Usage: checkauth " + + @staticmethod + def run(cmd, spl, length, authed, msg, agora, tx, ux): + if length == 2: + identifier = spl[1] + verified = ux.verify.get_external_user_id_status(identifier) + msg(f"Verification status: {verified}")