disconnect.py (587B)
1 import importlib 2 error_checker = importlib.import_module("fedcm.support.request-params-check") 3 4 def main(request, response): 5 response.headers.set(b"Content-Type", b"application/json") 6 response.headers.set(b"Access-Control-Allow-Origin", request.headers.get(b"origin")) 7 response.headers.set(b"Access-Control-Allow-Credentials", b"true") 8 request_error = error_checker.revokeCheck(request) 9 if request_error: 10 return request_error 11 12 # Pass the account_hint as the accountId. 13 account_hint = request.POST.get(b"account_hint") 14 return f"{{\"account_id\": \"{account_hint}\"}}"