1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytest
5, mock
6, cryptography
7, requests
8}:
9
10buildPythonPackage rec {
11 version = "0.15.5";
12 pname = "authlib";
13
14 src = fetchFromGitHub {
15 owner = "lepture";
16 repo = "authlib";
17 rev = "v${version}";
18 sha256 = "1893mkzrlfxpxrgv10y134y8c3ni5hb0qvb0wsc76d2k4mci5j3n";
19 };
20
21 propagatedBuildInputs = [ cryptography requests ];
22
23 checkInputs = [ mock pytest ];
24
25 checkPhase = ''
26 PYTHONPATH=$PWD:$PYTHONPATH pytest tests/{core,files}
27 '';
28
29 meta = with lib; {
30 homepage = "https://github.com/lepture/authlib";
31 description = "The ultimate Python library in building OAuth and OpenID Connect servers. JWS,JWE,JWK,JWA,JWT included.";
32 maintainers = with maintainers; [ flokli ];
33 license = licenses.bsd3;
34 };
35}