Projet

Général

Profil

0001-misc-fix-spelling-of-OpenID-Connect-70747.patch

Frédéric Péters, 26 octobre 2022 19:58

Télécharger (4,52 ko)

Voir les différences:

Subject: [PATCH] misc: fix spelling of OpenID Connect (#70747)

 src/authentic2/journal_event_types.py               | 2 +-
 src/authentic2_auth_oidc/migrations/0001_initial.py | 2 +-
 src/authentic2_auth_oidc/models.py                  | 2 +-
 src/authentic2_auth_oidc/views.py                   | 4 ++--
 src/authentic2_idp_oidc/views.py                    | 2 +-
 tests/test_manager_authenticators.py                | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)
src/authentic2/journal_event_types.py
126 126
    elif how == 'saml':
127 127
        return 'SAML'
128 128
    elif how == 'oidc':
129
        return 'OpenIDConnect'
129
        return 'OpenID Connect'
130 130
    elif how:
131 131
        return how
132 132
    else:
src/authentic2_auth_oidc/migrations/0001_initial.py
129 129
                ),
130 130
            ],
131 131
            options={
132
                'verbose_name': 'OpenIDConnect',
132
                'verbose_name': 'OpenID Connect',
133 133
            },
134 134
        ),
135 135
        migrations.AddField(
src/authentic2_auth_oidc/models.py
127 127
    description_fields = ['show_condition', 'issuer', 'scopes', 'strategy', 'created', 'modified']
128 128

  
129 129
    class Meta:
130
        verbose_name = _('OpenIDConnect')
130
        verbose_name = _('OpenID Connect')
131 131
        constraints = [
132 132
            models.UniqueConstraint(
133 133
                fields=['issuer'],
src/authentic2_auth_oidc/views.py
149 149
        try:
150 150
            provider = get_provider_by_issuer(issuer)
151 151
        except OIDCProvider.DoesNotExist:
152
            messages.warning(request, _('Unknown OpenID connect issuer: "%s"') % issuer)
152
            messages.warning(request, _('Unknown OpenID Connect issuer: "%s"') % issuer)
153 153
            logger.warning('auth_oidc: unknown issuer, %s', issuer)
154 154
            return self.continue_to_next_url(request)
155 155

  
......
339 339
                    'Login with %(provider_name)s failed, report %(request_id)s to an administrator (%(error)s)'
340 340
                )
341 341
            else:
342
                message = _('Login with OpenIDConnect failed, report %s to an administrator. (%(error)s)')
342
                message = _('Login with OpenID Connect failed, report %s to an administrator. (%(error)s)')
343 343

  
344 344
            messages.warning(request, message % message_params)
345 345
        return self.continue_to_next_url(request)
src/authentic2_idp_oidc/views.py
120 120
        if self.show_message:
121 121
            messages.error(
122 122
                request,
123
                _('OpenIDConnect Error "%(error_code)s": %(error_description)s')
123
                _('OpenID Connect Error "%(error_code)s": %(error_description)s')
124 124
                % {'error_code': self.error_code, 'error_description': self.error_description},
125 125
            )
126 126

  
tests/test_manager_authenticators.py
183 183
    assert 'Scopes: profile email' in resp.text
184 184

  
185 185
    resp = app.get('/manage/authenticators/')
186
    assert 'OpenIDConnect - Test' in resp.text
186
    assert 'OpenID Connect - Test' in resp.text
187 187
    assert 'class="section disabled"' in resp.text
188 188
    assert 'OIDC provider linked to' not in resp.text
189 189

  
190
-