#!/usr/bin/env python3

# modules are all in the parent directory
import sys
sys.path.append('..')

# import helpers from modules
from helpers import get_client_cert
from db import *

TLS_CLIENT_HASH = get_client_cert()
user_id = check_hash(TLS_CLIENT_HASH)
user_name = get_name(user_id) or "[Not Set]"

print("# Welcome: User Logged In")
print()

print("## Your USER ID:")
print(user_id)
print()

print("## Your USER NAME:")
print(user_name)
print("=> ../change-name Change User Name")
print()

print("## TLS Certs associated with account")
print("=> ../update-auth-code Generate an auth code to add another cert to your account")
print("=> ../add-cert Add another cert to your account (with auth code)")
print()

#vim:fenc=utf-8:ts=4:sw=4:sta:noet:sts=4:fdm=marker:ai
