Implement verification commands

master
Mark Veidemanis 2 years ago
parent ed5fd3dafd
commit ae08955d6b
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -915,3 +915,27 @@ class IRCCommands(object):
currencies = tx.sinks.currencies currencies = tx.sinks.currencies
tx.markets.distribute_account_details() tx.markets.distribute_account_details()
msg(f"Distributing account details for currencies: {', '.join(currencies)}") 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 <identifier>"
@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 <identifier>"
@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}")

Loading…
Cancel
Save