<commit_before># Standard Libary
# Debug Toolbar
from .base import *

HOST_NAME = 'http://localhost:8000'
DEBUG = True
ALLOWED_HOSTS = [
    'localhost',
]


EMAIL_PORT = 1025

MIDDLEWARE = [
    'debug_toolbar.middleware.DebugToolbarMiddleware',
] + MIDDLEWARE

MIDDLEWARE += [
    'querycount.middleware.QueryCountMiddleware',
]


DEBUG_TOOLBAR_PANELS = [
    'debug_toolbar.panels.timer.TimerPanel',
    'debug_toolbar.panels.request.RequestPanel',
    'debug_toolbar.panels.settings.SettingsPanel',
    'debug_toolbar.panels.sql.SQLPanel',
    'debug_toolbar.panels.signals.SignalsPanel',
    'debug_toolbar.panels.logging.LoggingPanel',
    'debug_toolbar.panels.redirects.RedirectsPanel',
]


# Auth0 - COPIED until i can mock
AUTH0_CLIENT_ID = get_env_variable("AUTH0_CLIENT_ID")
AUTH0_CLIENT_SECRET = get_env_variable("AUTH0_CLIENT_SECRET")
AUTH0_CLIENT_DOMAIN = get_env_variable("AUTH0_CLIENT_DOMAIN")
AUTH0_API_ID = get_env_variable("AUTH0_API_ID")
AUTH0_API_SECRET = get_env_variable("AUTH0_API_SECRET")
AUTH0_API_DOMAIN = get_env_variable("AUTH0_API_DOMAIN")



def jwt_get_username_from_payload_handler(payload):
    """Switch to email as JWT username payload."""
    return payload.get('email')

from cryptography import x509
from cryptography.hazmat.backends import default_backend

pem_data = b"""
-----BEGIN CERTIFICATE-----
MIIDDTCCAfWgAwIBAgIJPuLUYhcdfwcOMA0GCSqGSIb3DQEBCwUAMCQxIjAgBgNV
B<KEY>cN
MzExMDE5MTgyOTA2WjAkMSIwIAYDVQQDExliYXJiZXJzY29yZS1kZXYuYXV0aDAu
Y29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3FTGBVil9QjWlfCk
L8G9VY4b8UEZhkRi4C9R6+3TiLLjsGe11bk4uydEoYOqnGl5QCcG1LfVDiStjrHs
6PNdj18TTi8EBbIicCPmcCILqglEwuyexogo2u3d2R6Qwu0STu0xCbXMwrraWKaZ
68MLLG7+Jp/znPcOMNi392qLEZKTSv8GXQzYa+/rFNhpHpqiGA3FzmvH/1jQgWpO
1PF9kWXoKUkktlaN8hpQtVrThpQFF5IirXj/A6XhYQVEQEFwYM3kLLvXUeW1QJB3
/T+PDdLYiShwrNRtnzo/axrPa0EpMffIEtEaFG/95fnyO+qdOunHck50s2kTYIb6
vcEBbQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSi3RnXKUbR
62i31WJbbAzGJWw9xDAOBgNVHQ8BAf8EBAMCAoQwDQYJKoZIhvcNAQELBQADggEB
ACU3ZIPShubA4dSo9JyJzLXnvY+N32XDiVwyF4zMNbz7Jr5tgW5CXzcDvTSH7KkW
nzP3+qBULVY224daSfsWdwz/9ZK+5OGMkYCSpiS+1lAH4gDIctwJbn/82idqWZWN
BKWRf27qh/dVFLAlNu69BIw5XUjMjhDN1v6ABYRb2Ht0pAesSw+A3lHJvFmdEhf2
XcopG+t8nnohFDPAeHKzEHnHOF1YIMKkFbc0UBC3jrS/P+sX1V6sm3znQ2ZE0aBi
a/ZlOmOZFZRUUChffFULBp3I82+NsZH6duXP5R2/c2ZxBSrtpeaeSNNerpwyr2iH
2PpfXUn1tsVm6EGPQPgrHcA=
-----END CERTIFICATE-----
""".strip()
# pem_data = b"""
# -----BEGIN CERTIFICATE-----
# <KEY>
# <KEY>
# <KEY>
# <KEY>
# <KEY>
# <KEY>
# <KEY>
# <KEY>
# <KEY>
# <KEY>
# v/<KEY>
# -----END CERTIFICATE-----
# """.strip()
cert = x509.load_pem_x509_certificate(pem_data, default_backend())
jwt_public_key = cert.public_key()

JWT_AUTH = {
    'JWT_AUDIENCE': AUTH0_CLIENT_ID,<commit_msg>Dev settings for auth0 certificate<commit_after># Standard Libary
# Debug Toolbar
from .base import *

HOST_NAME = 'http://localhost:8000'
DEBUG = True
ALLOWED_HOSTS = [
    'localhost',
]


EMAIL_PORT = 1025

MIDDLEWARE = [
    'debug_toolbar.middleware.DebugToolbarMiddleware',
] + MIDDLEWARE

MIDDLEWARE += [
    'querycount.middleware.QueryCountMiddleware',
]


DEBUG_TOOLBAR_PANELS = [
    'debug_toolbar.panels.timer.TimerPanel',
    'debug_toolbar.panels.request.RequestPanel',
    'debug_toolbar.panels.settings.SettingsPanel',
    'debug_toolbar.panels.sql.SQLPanel',
    'debug_toolbar.panels.signals.SignalsPanel',
    'debug_toolbar.panels.logging.LoggingPanel',
    'debug_toolbar.panels.redirects.RedirectsPanel',
]


# Auth0 - COPIED until i can mock
AUTH0_CLIENT_ID = get_env_variable("AUTH0_CLIENT_ID")
AUTH0_CLIENT_SECRET = get_env_variable("AUTH0_CLIENT_SECRET")
AUTH0_CLIENT_DOMAIN = get_env_variable("AUTH0_CLIENT_DOMAIN")
AUTH0_API_ID = get_env_variable("AUTH0_API_ID")
AUTH0_API_SECRET = get_env_variable("AUTH0_API_SECRET")
AUTH0_API_DOMAIN = get_env_variable("AUTH0_API_DOMAIN")



def jwt_get_username_from_payload_handler(payload):
    """Switch to email as JWT username payload."""
    return payload.get('email')

from cryptography import x509
from cryptography.hazmat.backends import default_backend

pem_data = get_env_variable("AUTH0_CERTIFICATE")
pem_data = pem_data.encode()

cert = x509.load_pem_x509_certificate(pem_data, default_backend())
jwt_public_key = cert.public_key()

JWT_AUTH = {
    'JWT_AUDIENCE': AUTH0_CLIENT_ID,
{'fraction_non_alphanumeric': 0.10221187427240978, 'fraction_numerical': 0.0440046565774156, 'mean_word_length': 6.970315398886828, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7451555', 'n_tokens_mistral': 2070, 'n_tokens_neox': 1973, 'n_words': 197}