status = 200 : return True return False def auth ( username : str, server : str, password : str ) -> bool : return verify_credentials ( username, password ) def isuser ( username, server ): return does_user_exist ( username ) def read (): ( pkt_size ,) = struct. format ( USER_ENDPOINT, user )) response = conn. HTTPConnection ( AKKOMA_HOST, AKKOMA_PORT ) def verify_credentials ( user : str, password : str ) -> bool : user_pass_b64 = b64encode ( " ". INFO ) # Akkoma functions def create_connection (): return http. basicConfig ( filename = LOGFILE, level = logging. Import sys import struct import http.client from base64 import b64encode import logging AKKOMA_HOST = "127.0.0.1" AKKOMA_PORT = "4000" AUTH_ENDPOINT = "/api/v1/accounts/verify_credentials" USER_ENDPOINT = "/api/v1/accounts" LOGFILE = "/var/log/ejabberd/akkoma_auth.log" logging. Optional software packages needed for specific functionality Switching a from-source install to OTP releases Setting up a Akkoma development environmentÄifferences in Mastodon API responses from vanilla Mastodon How to set rich media cache ttl based on image ttl How to enable text search for Chinese, Japanese and Korean How to configure upstream proxy for federation How to activate Akkoma in-database configurationĬonfiguring Ejabberd (XMPP Server) to use Akkoma for authenticationĬonfiguring MongooseIM (XMPP Server) to use Akkoma for authentication How to use a different domain name for Akkoma and the users it serves Transfering the config to/from the database
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |