Project

General

Profile

0001-backends-PEP8ness-copyright-30451.patch

Benjamin Dauvergne, 12 Feb 2019 09:46 AM

Download (1.65 KB)

View differences:

Subject: [PATCH 1/2] backends: PEP8ness, copyright (#30451)

 mellon/backends.py | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
mellon/backends.py
1
# django-mellon - SAML2 authentication for Django
2
# Copyright (C) 2014-2019 Entr'ouvert
3
# This program is free software: you can redistribute it and/or modify
4
# it under the terms of the GNU Affero General Public License as
5
# published by the Free Software Foundation, either version 3 of the
6
# License, or (at your option) any later version.
7

  
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU Affero General Public License for more details.
12

  
13
# You should have received a copy of the GNU Affero General Public License
14
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
15

  
1 16
from django.contrib.auth.backends import ModelBackend
2 17

  
3 18
from . import utils
......
6 21
class SAMLBackend(ModelBackend):
7 22
    def authenticate(self, saml_attributes):
8 23
        # without an issuer we can do nothing
9
        if not 'issuer' in saml_attributes:
24
        if 'issuer' not in saml_attributes:
10 25
            return
11 26
        idp = utils.get_idp(saml_attributes['issuer'])
12 27
        adapters = utils.get_adapters(idp)
13
-