Projet

Général

Profil

0001-misc-copy-context-inherited-context-in-authenticator.patch

Benjamin Dauvergne, 25 mai 2022 10:39

Télécharger (1,68 ko)

Voir les différences:

Subject: [PATCH] misc: copy context inherited context in authenticator's login
 (#65693)

 src/authentic2_auth_oidc/models.py         | 2 +-
 src/authentic2_auth_saml/authenticators.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
src/authentic2_auth_oidc/models.py
180 180
        return redirect_to_login(request, login_url='oidc-login', kwargs={'pk': self.pk})
181 181

  
182 182
    def login(self, request, *args, **kwargs):
183
        context = kwargs.get('context', {})
183
        context = kwargs.get('context', {}).copy()
184 184
        context['provider'] = self
185 185
        context['login_url'] = make_url(
186 186
            'oidc-login', kwargs={'pk': self.id}, request=request, keep_params=True
src/authentic2_auth_saml/authenticators.py
52 52
        return redirect_to_login(request)
53 53

  
54 54
    def login(self, request, *args, **kwargs):
55
        context = kwargs.pop('context', {})
55
        context = kwargs.pop('context', {}).copy()
56 56
        instance_id = kwargs.get('instance_id')
57 57
        submit_name = 'login-%s-%s' % (self.id, instance_id)
58 58
        context['submit_name'] = submit_name
59
-