Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lfSXm-00041v-Nf for pgadmin-hackers@arkaria.postgresql.org; Sat, 08 May 2021 19:23:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lfSXj-0003Ad-58 for pgadmin-hackers@arkaria.postgresql.org; Sat, 08 May 2021 19:23:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lf2bV-0008PM-JS for pgadmin-hackers@lists.postgresql.org; Fri, 07 May 2021 15:41:25 +0000 Received: from mout02.posteo.de ([185.67.36.66]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lf2bS-0006qx-F6 for pgadmin-hackers@postgresql.org; Fri, 07 May 2021 15:41:25 +0000 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id BCD942400FD for ; Fri, 7 May 2021 17:41:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1620402080; bh=JxC4NOQXCAYkALZUFZ7oXhPZwCXkp9EGgoL/jIfObew=; h=To:From:Subject:Date:From; b=F/AKgWu49g9xKQVfRhgwyXBYVdK8a0D2A+7EPm25t3Ygp6UnVuJwNmNRlrg97c0BG 4jsDy7fRY1BuDEnrM5l1IExm7QNhEU1Z0LLe6ulDWMzJJvRymz/XQBBDSyl+ayhe9t tYUvVgtOVIo6cen7K/N35eWaYK2SqraKMoxphK16ZYycvMYiEFmPw1QfdOD9cJb409 2JDEHkRQ2BasPQyCpHjWdFXKDjZmMZXK/zTsyviGN7GRs2LFOefLlHjLOQA3PsRmgm 3B/2peeUqxoyeFAlUniYrVjn/aI6frQd2XSZPrGg+vpxaznAuqOrb69+cApfr+OK3P sv3PDx7Qj5oNg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FcF6S0PhPz9rxS for ; Fri, 7 May 2021 17:41:19 +0200 (CEST) To: pgadmin-hackers@postgresql.org From: Florian Sabonchi Subject: oauth2 patch Message-ID: Date: Fri, 7 May 2021 15:41:18 +0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------DD8DB929B327031546D5771C" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------DD8DB929B327031546D5771C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello in this patch I have implemented OAuth2. Unfortunately I wasn't sure how the test should look like, because I couldn't find anything in the developer documentation, so I decided not to write one for now. The configuration has to look like this here is an example for github: OAUTH2_NAME = 'github' OAUTH2_CLIENT_ID = 'secret' OAUTH2_CLIENT_SECRET = 'secret' OAUTH2_TOKEN_URL = 'https://github.com/login/oauth/access_token' OAUTH2_AUTHORIZATION_URL = 'https://github.com/login/oauth/authorize' OAUTH2_API_BASE_URL = 'https://api.github.com/' OAUTH2_USERINFO_ENDPOINT = 'https://api.github.com/user' OAUTH_ENDPOINT_NAME = 'user' --------------DD8DB929B327031546D5771C Content-Type: text/x-patch; charset=UTF-8; name="0001-Draft-for-oauth2-added.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Draft-for-oauth2-added.patch"