mirror of
https://github.com/chatmail/relay.git
synced 2026-05-14 09:54:38 +00:00
add doveauth entrypoint for lua
This commit is contained in:
@@ -6,6 +6,9 @@ build-backend = "setuptools.build_meta"
|
||||
name = "doveauth"
|
||||
version = "0.1"
|
||||
|
||||
[project.scripts]
|
||||
doveauth = "doveauth.doveauth:main"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = "-v -ra --strict-markers"
|
||||
|
||||
|
||||
0
doveauth/src/doveauth/__init__.py
Normal file
0
doveauth/src/doveauth/__init__.py
Normal file
@@ -45,7 +45,7 @@ def dump_result(res):
|
||||
print(f"{key}={value}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
if sys.argv[1] == "hexauth":
|
||||
login = base64.b16decode(sys.argv[2]).decode()
|
||||
password = base64.b16decode(sys.argv[3]).decode()
|
||||
@@ -55,3 +55,7 @@ if __name__ == "__main__":
|
||||
login = base64.b16decode(sys.argv[2]).decode()
|
||||
res = lookup_user(login)
|
||||
dump_result(res)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -2,3 +2,5 @@
|
||||
python3 -m venv chatmail-pyinfra/venv
|
||||
chatmail-pyinfra/venv/bin/pip install pyinfra
|
||||
chatmail-pyinfra/venv/bin/pip install -e chatmail-pyinfra
|
||||
python3 -m venv doveauth/venv
|
||||
doveauth/venv/bin/pip install -e doveauth
|
||||
|
||||
Reference in New Issue
Block a user