diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2016-01-15 21:03:42 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2016-01-15 21:03:42 +0100 |
commit | 5d6a8c8939382c4c6fb9f3205a865606a28c9b42 (patch) | |
tree | 0b63444d49757f7efb26af7386359885639fe1d2 /login.py | |
parent | dd4f295a0c0ca578922bddb9da36f87f5d7ad1b4 (diff) | |
download | auth-xmppmessage-5d6a8c8939382c4c6fb9f3205a865606a28c9b42.tar.gz auth-xmppmessage-5d6a8c8939382c4c6fb9f3205a865606a28c9b42.zip |
send clickable link in jabber message
Diffstat (limited to 'login.py')
-rwxr-xr-x | login.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -5,6 +5,7 @@ import sys import time import struct import hashlib +from urllib.parse import quote as urlencode # To speed up start time load some modules only as needed @@ -65,6 +66,8 @@ def token_message(username, secret, validsec): time.strftime("%c %Z(%z)", time.gmtime(time_next_end))) message += "\nRequested by: {} for: {} on: {}".format( os.getenv("IP"), ascii(os.getenv("URI")), os.getenv("HTTP_HOST")) + message += "\nhttps://{}:{}@{}{}".format(urlencode(username), + token, os.getenv("HTTP_HOST"), urlencode(os.getenv("URI"))) return message |