From bb5242eb6ab4f98abae5105ef7b37389eeab903d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@entrouvert.com>
Date: Wed, 26 Oct 2022 19:19:18 +0200
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(-)

diff --git a/src/authentic2/journal_event_types.py b/src/authentic2/journal_event_types.py
index aa7b593d6..95711f0f1 100644
--- a/src/authentic2/journal_event_types.py
+++ b/src/authentic2/journal_event_types.py
@@ -126,7 +126,7 @@ def login_method_label(how):
     elif how == 'saml':
         return 'SAML'
     elif how == 'oidc':
-        return 'OpenIDConnect'
+        return 'OpenID Connect'
     elif how:
         return how
     else:
diff --git a/src/authentic2_auth_oidc/migrations/0001_initial.py b/src/authentic2_auth_oidc/migrations/0001_initial.py
index 03eadbd98..2627689d0 100644
--- a/src/authentic2_auth_oidc/migrations/0001_initial.py
+++ b/src/authentic2_auth_oidc/migrations/0001_initial.py
@@ -129,7 +129,7 @@ class Migration(migrations.Migration):
                 ),
             ],
             options={
-                'verbose_name': 'OpenIDConnect',
+                'verbose_name': 'OpenID Connect',
             },
         ),
         migrations.AddField(
diff --git a/src/authentic2_auth_oidc/models.py b/src/authentic2_auth_oidc/models.py
index 37a23987d..375f47811 100644
--- a/src/authentic2_auth_oidc/models.py
+++ b/src/authentic2_auth_oidc/models.py
@@ -127,7 +127,7 @@ class OIDCProvider(BaseAuthenticator):
     description_fields = ['show_condition', 'issuer', 'scopes', 'strategy', 'created', 'modified']
 
     class Meta:
-        verbose_name = _('OpenIDConnect')
+        verbose_name = _('OpenID Connect')
         constraints = [
             models.UniqueConstraint(
                 fields=['issuer'],
diff --git a/src/authentic2_auth_oidc/views.py b/src/authentic2_auth_oidc/views.py
index 8044fe44b..ab75388a2 100644
--- a/src/authentic2_auth_oidc/views.py
+++ b/src/authentic2_auth_oidc/views.py
@@ -149,7 +149,7 @@ class LoginCallback(View):
         try:
             provider = get_provider_by_issuer(issuer)
         except OIDCProvider.DoesNotExist:
-            messages.warning(request, _('Unknown OpenID connect issuer: "%s"') % issuer)
+            messages.warning(request, _('Unknown OpenID Connect issuer: "%s"') % issuer)
             logger.warning('auth_oidc: unknown issuer, %s', issuer)
             return self.continue_to_next_url(request)
 
@@ -339,7 +339,7 @@ class LoginCallback(View):
                     'Login with %(provider_name)s failed, report %(request_id)s to an administrator (%(error)s)'
                 )
             else:
-                message = _('Login with OpenIDConnect failed, report %s to an administrator. (%(error)s)')
+                message = _('Login with OpenID Connect failed, report %s to an administrator. (%(error)s)')
 
             messages.warning(request, message % message_params)
         return self.continue_to_next_url(request)
diff --git a/src/authentic2_idp_oidc/views.py b/src/authentic2_idp_oidc/views.py
index 8d0fb8c63..decdee537 100644
--- a/src/authentic2_idp_oidc/views.py
+++ b/src/authentic2_idp_oidc/views.py
@@ -120,7 +120,7 @@ class OIDCException(Exception):
         if self.show_message:
             messages.error(
                 request,
-                _('OpenIDConnect Error "%(error_code)s": %(error_description)s')
+                _('OpenID Connect Error "%(error_code)s": %(error_description)s')
                 % {'error_code': self.error_code, 'error_description': self.error_description},
             )
 
diff --git a/tests/test_manager_authenticators.py b/tests/test_manager_authenticators.py
index 0c59e8da7..78be125af 100644
--- a/tests/test_manager_authenticators.py
+++ b/tests/test_manager_authenticators.py
@@ -183,7 +183,7 @@ def test_authenticators_oidc(app, superuser, ou1, ou2):
     assert 'Scopes: profile email' in resp.text
 
     resp = app.get('/manage/authenticators/')
-    assert 'OpenIDConnect - Test' in resp.text
+    assert 'OpenID Connect - Test' in resp.text
     assert 'class="section disabled"' in resp.text
     assert 'OIDC provider linked to' not in resp.text
 
-- 
2.37.2

