@@ -28,8 +28,45 @@ class BBMyMedicareCallbackCrosswalkUpdateException(APIException):
2828 # BB2-237 custom exception
2929 status_code = status .HTTP_500_INTERNAL_SERVER_ERROR
3030
31-
32- def get_and_update_user (slsx_client : OAuth2ConfigSLSx , request ):
31+ # def _get_and_update_user(mbi, user_id, hicn_hash, request):
32+ # """
33+ # Base function to get and update user from either authorize or refresh flows.
34+ # """
35+
36+ # version = request.session['version']
37+ # logger = logging.getLogger(logging.AUDIT_AUTHN_MED_CALLBACK_LOGGER, request)
38+
39+ # # Match a patient identifier via the backend FHIR server
40+ # if version == Versions.V3:
41+ # hicn_hash = None
42+
43+ # versioned_fhir_ids = {}
44+ # # Perform fhir_id lookup for all supported versions
45+ # # If the lookup for the requested version fails, raise the exception
46+ # # This is wrapped in the case that if the requested version fails, match_fhir_id
47+ # # will still bubble up UpstreamServerException
48+ # for supported_version in Versions.latest_versions():
49+ # try:
50+ # fhir_id, hash_lookup_type = match_fhir_id(
51+ # mbi=mbi,
52+ # hicn_hash=hicn_hash,
53+ # request=request,
54+ # version=supported_version,
55+ # )
56+ # versioned_fhir_ids[supported_version] = fhir_id
57+ # except UpstreamServerException as e:
58+ # if supported_version == version:
59+ # raise e
60+
61+ # bfd_fhir_id_v2 = versioned_fhir_ids.get(Versions.V2, None)
62+ # bfd_fhir_id_v3 = versioned_fhir_ids.get(Versions.V3, None)
63+
64+
65+ # def get_and_update_from_refresh(mbi, user_id, hicn_hash, request):
66+ # version = request.session['version']
67+ # pass
68+
69+ def get_and_update_user_from_authorize (slsx_client : OAuth2ConfigSLSx , request ):
3370 """
3471 Find or create the user associated
3572 with the identity information from the ID provider.
0 commit comments