From 66c188f18cee5270da90c0dfbf42bc6567128a48 Mon Sep 17 00:00:00 2001 From: 0x3d Date: Wed, 7 Feb 2024 11:05:01 +0100 Subject: [PATCH] Proper labelling --- psa_car_controller/psa/oauth.py | 2 +- psa_car_controller/psacc/application/psa_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/psa_car_controller/psa/oauth.py b/psa_car_controller/psa/oauth.py index 900636d..bd15f96 100644 --- a/psa_car_controller/psa/oauth.py +++ b/psa_car_controller/psa/oauth.py @@ -35,7 +35,7 @@ class OpenIdCredentialManager(CredentialManager): challenge = encoded.decode('ascii')[:-1] return verifier, challenge - def init_with_user_credentials_realm(self, country_code: str): + def init_with_country_code(self, country_code: str): redir_uri = "mymop://oauth2redirect/" + country_code.lower() code_verifier, code_challenge = self.generate_sha256_pkce(64) url = self.generate_authorize_url(redir_uri, secrets.token_urlsafe(16), diff --git a/psa_car_controller/psacc/application/psa_client.py b/psa_car_controller/psacc/application/psa_client.py index b510fec..4fefd3f 100644 --- a/psa_car_controller/psacc/application/psa_client.py +++ b/psa_car_controller/psacc/application/psa_client.py @@ -32,7 +32,7 @@ logger = CustomLogger.getLogger(__name__) class PSAClient: def connect(self, country_code): - self.manager.init_with_user_credentials_realm(country_code) + self.manager.init_with_country_code(country_code) # pylint: disable=too-many-arguments def __init__(self, refresh_token, client_id, client_secret, remote_refresh_token, customer_id, realm, country_code,