in userbeacon/jwt_auth_backend.py [0:0]
def load_local_public_key():
try:
with open(settings.JWT_CERTIFICATE_PATH, "r") as certfile:
cert_raw = certfile.read().encode("ASCII")
cert = load_pem_x509_certificate(cert_raw, default_backend())
return cert.public_key()
except Exception as e:
logger.error('Could not read certificate: ' + str(e))
raise