1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitLab,
5 setuptools,
6 setuptools-scm,
7 click,
8 python-keycloak,
9 python-jose,
10 pyyaml,
11 swh-core,
12 aiocache,
13 httpx,
14 pytestCheckHook,
15 pytest-django,
16 pytest-mock,
17 djangorestframework,
18 starlette,
19}:
20
21buildPythonPackage rec {
22 pname = "swh-auth";
23 version = "0.10.0";
24 pyproject = true;
25
26 src = fetchFromGitLab {
27 domain = "gitlab.softwareheritage.org";
28 group = "swh";
29 owner = "devel";
30 repo = "swh-auth";
31 tag = "v${version}";
32 hash = "sha256-8ctd5D7zT66oVNZlvRIs8pN7Fe2BhTgC+S9p1HBDO9E=";
33 };
34
35 build-system = [
36 setuptools
37 setuptools-scm
38 ];
39
40 dependencies = [
41 click
42 python-keycloak
43 python-jose
44 pyyaml
45 swh-core
46 ];
47
48 pythonImportsCheck = [ "swh.auth" ];
49
50 nativeCheckInputs = [
51 aiocache
52 djangorestframework
53 httpx
54 pytestCheckHook
55 pytest-django
56 pytest-mock
57 starlette
58 ];
59
60 meta = {
61 description = "Set of utility libraries related to user authentication in applications and services based on the use of Keycloak and OpenID Connect";
62 homepage = "https://gitlab.softwareheritage.org/swh/devel/swh-auth";
63 license = lib.licenses.gpl3Only;
64 maintainers = with lib.maintainers; [ ];
65 };
66}