diff --git a/e2e/test_provider_proxy.py b/e2e/test_provider_proxy.py index 57be8b831..10918d5b0 100644 --- a/e2e/test_provider_proxy.py +++ b/e2e/test_provider_proxy.py @@ -52,7 +52,7 @@ class TestProviderProxy(SeleniumTestCase): auto_remove=True, environment={ "PASSBOOK_HOST": self.live_server_url, - "PASSBOOK_TOKEN": outpost.token.token_uuid.hex, + "PASSBOOK_TOKEN": outpost.token.key, }, ) return container diff --git a/passbook/admin/templates/generic/form.html b/passbook/admin/templates/generic/form.html index 5ce597ea9..f158f9ac7 100644 --- a/passbook/admin/templates/generic/form.html +++ b/passbook/admin/templates/generic/form.html @@ -1,4 +1,4 @@ -{% extends "administration/base.html" %} +{% extends container_template|default:"administration/base.html" %} {% load i18n %} {% load passbook_utils %} diff --git a/passbook/api/auth.py b/passbook/api/auth.py index 37a702857..fbc370605 100644 --- a/passbook/api/auth.py +++ b/passbook/api/auth.py @@ -28,7 +28,7 @@ def token_from_header(raw_header: bytes) -> Optional[Token]: # TODO: Remove this workaround # temporary fallback for 0.11 to 0.12 upgrade # 0.11 and below proxy sends authorization header not base64 encoded - auth_credentials = auth_credentials + pass # Accept credentials with username and without if ":" in auth_credentials: _, password = auth_credentials.split(":") diff --git a/passbook/core/migrations/0014_auto_20201018_1158.py b/passbook/core/migrations/0014_auto_20201018_1158.py index a40101019..78c20804a 100644 --- a/passbook/core/migrations/0014_auto_20201018_1158.py +++ b/passbook/core/migrations/0014_auto_20201018_1158.py @@ -34,7 +34,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="token", name="identifier", - field=models.CharField(max_length=255), + field=models.SlugField(max_length=255), ), migrations.AddIndex( model_name="token", diff --git a/passbook/core/models.py b/passbook/core/models.py index 3e6d3df83..9fb968024 100644 --- a/passbook/core/models.py +++ b/passbook/core/models.py @@ -309,7 +309,7 @@ class Token(ExpiringModel): """Token used to authenticate the User for API Access or confirm another Stage like Email.""" token_uuid = models.UUIDField(primary_key=True, editable=False, default=uuid4) - identifier = models.CharField(max_length=255) + identifier = models.SlugField(max_length=255) key = models.TextField(default=default_token_key) intent = models.TextField( choices=TokenIntents.choices, default=TokenIntents.INTENT_VERIFICATION diff --git a/passbook/core/templates/generic/delete.html b/passbook/core/templates/generic/delete.html index 92e5bd6dc..7f74699ea 100644 --- a/passbook/core/templates/generic/delete.html +++ b/passbook/core/templates/generic/delete.html @@ -1,4 +1,4 @@ -{% extends "administration/base.html" %} +{% extends container_template|default:"administration/base.html" %} {% load i18n %} {% load passbook_utils %}