reformat private key

This commit is contained in:
Kenneth Kehl
2023-12-15 12:16:03 -08:00
parent cec2d7ea02
commit f54a79bdf9
2 changed files with 6 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ from app.utils import hide_from_search_engines
from app.utils.login import is_safe_redirect_url
def _reformulate_keystring(orig):
def _reformat_keystring(orig):
new_keystring = orig.replace("-----BEGIN PRIVATE KEY-----", "")
new_keystring = new_keystring.replace("-----END PRIVATE KEY-----", "")
new_keystring = new_keystring.strip()
@@ -42,7 +42,7 @@ def _get_access_token(code, state):
access_token_url = os.getenv("LOGIN_DOT_GOV_ACCESS_TOKEN_URL")
keystring = os.getenv("LOGIN_PEM")
if " " in keystring:
keystring = _reformulate_keystring(keystring)
keystring = _reformat_keystring(keystring)
payload = {
"iss": client_id,