From 7b16429453a58e07dfd10ea99596bf106aa47ef1 Mon Sep 17 00:00:00 2001 From: gregoxx Date: Thu, 1 Apr 2021 08:55:24 +0100 Subject: [PATCH 1/9] add license and copyright notices --- NOTICE | 2 ++ ckanext/__init__.py | 17 +++++++++++++++++ ckanext/saml2auth/__init__.py | 17 +++++++++++++++++ ckanext/saml2auth/helpers.py | 17 +++++++++++++++++ ckanext/saml2auth/interfaces.py | 17 +++++++++++++++++ ckanext/saml2auth/plugin.py | 17 +++++++++++++++++ ckanext/saml2auth/spconfig.py | 17 +++++++++++++++++ ckanext/saml2auth/templates/header.html | 17 +++++++++++++++++ .../templates/user/snippets/login_form.html | 17 +++++++++++++++++ ckanext/saml2auth/tests/__init__.py | 17 +++++++++++++++++ ckanext/saml2auth/tests/test_blueprint.py | 17 +++++++++++++++++ .../tests/test_blueprint_get_request.py | 17 +++++++++++++++++ ckanext/saml2auth/tests/test_client.py | 17 +++++++++++++++++ ckanext/saml2auth/tests/test_helpers.py | 17 +++++++++++++++++ ckanext/saml2auth/tests/test_interface.py | 17 +++++++++++++++++ ckanext/saml2auth/tests/test_spconfig.py | 17 +++++++++++++++++ ckanext/saml2auth/views/__init__.py | 17 +++++++++++++++++ ckanext/saml2auth/views/saml2auth.py | 17 +++++++++++++++++ conftest.py | 17 +++++++++++++++++ setup.py | 17 +++++++++++++++++ 20 files changed, 325 insertions(+) create mode 100644 NOTICE diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..3fda0db0 --- /dev/null +++ b/NOTICE @@ -0,0 +1,2 @@ +ckanext-saml2auth +Copyright (c) 2020 Keitaro AB diff --git a/ckanext/__init__.py b/ckanext/__init__.py index ed48ed01..3a61b90c 100644 --- a/ckanext/__init__.py +++ b/ckanext/__init__.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 # this is a namespace package diff --git a/ckanext/saml2auth/__init__.py b/ckanext/saml2auth/__init__.py index e69de29b..381a2a61 100644 --- a/ckanext/saml2auth/__init__.py +++ b/ckanext/saml2auth/__init__.py @@ -0,0 +1,17 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + diff --git a/ckanext/saml2auth/helpers.py b/ckanext/saml2auth/helpers.py index 5b8ad6dc..cab219cf 100644 --- a/ckanext/saml2auth/helpers.py +++ b/ckanext/saml2auth/helpers.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 import logging import string diff --git a/ckanext/saml2auth/interfaces.py b/ckanext/saml2auth/interfaces.py index 32d8e4a0..fe600b51 100644 --- a/ckanext/saml2auth/interfaces.py +++ b/ckanext/saml2auth/interfaces.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + from ckan.plugins.interfaces import Interface diff --git a/ckanext/saml2auth/plugin.py b/ckanext/saml2auth/plugin.py index 22b59a1a..7bebd1c5 100644 --- a/ckanext/saml2auth/plugin.py +++ b/ckanext/saml2auth/plugin.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit diff --git a/ckanext/saml2auth/spconfig.py b/ckanext/saml2auth/spconfig.py index 261f8509..0d0eae8b 100644 --- a/ckanext/saml2auth/spconfig.py +++ b/ckanext/saml2auth/spconfig.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 from saml2.saml import NAME_FORMAT_URI diff --git a/ckanext/saml2auth/templates/header.html b/ckanext/saml2auth/templates/header.html index ff68a176..6e8f3036 100644 --- a/ckanext/saml2auth/templates/header.html +++ b/ckanext/saml2auth/templates/header.html @@ -1,3 +1,20 @@ + + {% ckan_extends %} {% block header_account_notlogged %} diff --git a/ckanext/saml2auth/templates/user/snippets/login_form.html b/ckanext/saml2auth/templates/user/snippets/login_form.html index 174ee58e..c3b60a31 100644 --- a/ckanext/saml2auth/templates/user/snippets/login_form.html +++ b/ckanext/saml2auth/templates/user/snippets/login_form.html @@ -1,3 +1,20 @@ + + {% ckan_extends %} {% block login_button %} diff --git a/ckanext/saml2auth/tests/__init__.py b/ckanext/saml2auth/tests/__init__.py index e69de29b..381a2a61 100644 --- a/ckanext/saml2auth/tests/__init__.py +++ b/ckanext/saml2auth/tests/__init__.py @@ -0,0 +1,17 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + diff --git a/ckanext/saml2auth/tests/test_blueprint.py b/ckanext/saml2auth/tests/test_blueprint.py index c8b72c14..b07b90b4 100644 --- a/ckanext/saml2auth/tests/test_blueprint.py +++ b/ckanext/saml2auth/tests/test_blueprint.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 import os import pytest diff --git a/ckanext/saml2auth/tests/test_blueprint_get_request.py b/ckanext/saml2auth/tests/test_blueprint_get_request.py index f6801763..d084afa4 100644 --- a/ckanext/saml2auth/tests/test_blueprint_get_request.py +++ b/ckanext/saml2auth/tests/test_blueprint_get_request.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 import base64 from datetime import datetime diff --git a/ckanext/saml2auth/tests/test_client.py b/ckanext/saml2auth/tests/test_client.py index 020425e1..6d74ef91 100644 --- a/ckanext/saml2auth/tests/test_client.py +++ b/ckanext/saml2auth/tests/test_client.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 import os import pytest diff --git a/ckanext/saml2auth/tests/test_helpers.py b/ckanext/saml2auth/tests/test_helpers.py index 09190da8..35299908 100644 --- a/ckanext/saml2auth/tests/test_helpers.py +++ b/ckanext/saml2auth/tests/test_helpers.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 import pytest diff --git a/ckanext/saml2auth/tests/test_interface.py b/ckanext/saml2auth/tests/test_interface.py index cfa2047d..681d1e21 100644 --- a/ckanext/saml2auth/tests/test_interface.py +++ b/ckanext/saml2auth/tests/test_interface.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + import os from collections import defaultdict diff --git a/ckanext/saml2auth/tests/test_spconfig.py b/ckanext/saml2auth/tests/test_spconfig.py index 0692de94..1facc8f9 100644 --- a/ckanext/saml2auth/tests/test_spconfig.py +++ b/ckanext/saml2auth/tests/test_spconfig.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 import pytest diff --git a/ckanext/saml2auth/views/__init__.py b/ckanext/saml2auth/views/__init__.py index e69de29b..381a2a61 100644 --- a/ckanext/saml2auth/views/__init__.py +++ b/ckanext/saml2auth/views/__init__.py @@ -0,0 +1,17 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + diff --git a/ckanext/saml2auth/views/saml2auth.py b/ckanext/saml2auth/views/saml2auth.py index a9f7b172..8a8faf32 100644 --- a/ckanext/saml2auth/views/saml2auth.py +++ b/ckanext/saml2auth/views/saml2auth.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # encoding: utf-8 import logging import copy diff --git a/conftest.py b/conftest.py index fae1fc4a..7a44f461 100644 --- a/conftest.py +++ b/conftest.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # -*- coding: utf-8 -*- pytest_plugins = [ diff --git a/setup.py b/setup.py index dfcf4d4e..63d10f11 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,20 @@ +""" +Copyright (c) 2020 Keitaro AB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" + # -*- coding: utf-8 -*- # Always prefer setuptools over distutils from setuptools import setup, find_packages From 2f8215ff20fdb3386a927fcee6bb7558c4159740 Mon Sep 17 00:00:00 2001 From: Greg Gibbs <33558582+gregoxx@users.noreply.github.com> Date: Tue, 6 Apr 2021 11:37:48 +0100 Subject: [PATCH 2/9] Update __init__.py --- ckanext/saml2auth/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ckanext/saml2auth/__init__.py b/ckanext/saml2auth/__init__.py index 381a2a61..93bf9c20 100644 --- a/ckanext/saml2auth/__init__.py +++ b/ckanext/saml2auth/__init__.py @@ -14,4 +14,3 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . """ - From 87e94ffb04a90d548999baea662948c87f55630a Mon Sep 17 00:00:00 2001 From: Greg Gibbs <33558582+gregoxx@users.noreply.github.com> Date: Tue, 6 Apr 2021 11:38:17 +0100 Subject: [PATCH 3/9] Update __init__.py --- ckanext/saml2auth/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/saml2auth/__init__.py b/ckanext/saml2auth/__init__.py index 93bf9c20..1ec138d2 100644 --- a/ckanext/saml2auth/__init__.py +++ b/ckanext/saml2auth/__init__.py @@ -13,4 +13,4 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . -""" +""" From a621dd64672fabc6d1962c882a9a5cfebcbf2679 Mon Sep 17 00:00:00 2001 From: Greg Gibbs <33558582+gregoxx@users.noreply.github.com> Date: Tue, 6 Apr 2021 11:38:36 +0100 Subject: [PATCH 4/9] Update __init__.py --- ckanext/saml2auth/__init__.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ckanext/saml2auth/__init__.py b/ckanext/saml2auth/__init__.py index 1ec138d2..8b137891 100644 --- a/ckanext/saml2auth/__init__.py +++ b/ckanext/saml2auth/__init__.py @@ -1,16 +1 @@ -""" -Copyright (c) 2020 Keitaro AB -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -""" From 360d17a3e9f8d2e349517be7569f4ad2680023eb Mon Sep 17 00:00:00 2001 From: Greg Gibbs <33558582+gregoxx@users.noreply.github.com> Date: Tue, 6 Apr 2021 11:39:23 +0100 Subject: [PATCH 5/9] Update __init__.py From 972276f3d0324652a0698a97fb4898cce027a54e Mon Sep 17 00:00:00 2001 From: Greg Gibbs <33558582+gregoxx@users.noreply.github.com> Date: Tue, 6 Apr 2021 11:46:46 +0100 Subject: [PATCH 6/9] Update __init__.py --- ckanext/saml2auth/__init__.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ckanext/saml2auth/__init__.py b/ckanext/saml2auth/__init__.py index 8b137891..f34e676e 100644 --- a/ckanext/saml2auth/__init__.py +++ b/ckanext/saml2auth/__init__.py @@ -1 +1,14 @@ - +""" +Copyright (c) 2020 Keitaro AB +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +""" +\n From aa081f0f075b1360d8aaf2ef7f23ea8977760650 Mon Sep 17 00:00:00 2001 From: Greg Gibbs <33558582+gregoxx@users.noreply.github.com> Date: Tue, 6 Apr 2021 11:47:50 +0100 Subject: [PATCH 7/9] Update __init__.py --- ckanext/saml2auth/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/saml2auth/__init__.py b/ckanext/saml2auth/__init__.py index f34e676e..e4f3f751 100644 --- a/ckanext/saml2auth/__init__.py +++ b/ckanext/saml2auth/__init__.py @@ -10,5 +10,5 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . + """ -\n From 8867e61b430ab5e09bb92b24175a7bb64a48ca41 Mon Sep 17 00:00:00 2001 From: Greg Gibbs <33558582+gregoxx@users.noreply.github.com> Date: Tue, 6 Apr 2021 11:48:50 +0100 Subject: [PATCH 8/9] Update __init__.py --- ckanext/saml2auth/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/saml2auth/tests/__init__.py b/ckanext/saml2auth/tests/__init__.py index 381a2a61..e2f71bba 100644 --- a/ckanext/saml2auth/tests/__init__.py +++ b/ckanext/saml2auth/tests/__init__.py @@ -13,5 +13,5 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . -""" +""" From 553b71c7054cd8a9005a00bce6a843d88420753c Mon Sep 17 00:00:00 2001 From: Greg Gibbs <33558582+gregoxx@users.noreply.github.com> Date: Tue, 6 Apr 2021 11:49:19 +0100 Subject: [PATCH 9/9] Update __init__.py --- ckanext/saml2auth/views/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/saml2auth/views/__init__.py b/ckanext/saml2auth/views/__init__.py index 381a2a61..e2f71bba 100644 --- a/ckanext/saml2auth/views/__init__.py +++ b/ckanext/saml2auth/views/__init__.py @@ -13,5 +13,5 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . -""" +"""