Browse Source

Updates to efilng hub integration

pull/172/head
Michael Olund 5 years ago
parent
commit
39ce708d1a
3 changed files with 10 additions and 16 deletions
  1. +0
    -4
      .env.example
  2. +9
    -11
      edivorce/apps/core/efilinghub.py
  3. +1
    -1
      edivorce/settings/base.py

+ 0
- 4
.env.example View File

@ -27,7 +27,3 @@ EFILING_HUB_API_BASE_URL=''
# BCE ID test accounts for localdev
EFILING_BCEID=
# Keycloak settings
KEYCLOAK_CLIENT_ID=
KEYCLOAK_CLIENT_SECRET=

+ 9
- 11
edivorce/apps/core/efilinghub.py View File

@ -11,7 +11,7 @@ logger = logging.getLogger(__name__)
PACKAGE_DOCUMENT_FORMAT = {
"name": "string",
"type": "WNC",
"type": "AFDO",
"isAmendment": "false",
"isSupremeCourtScheduling": "false",
"data": {},
@ -21,9 +21,9 @@ PACKAGE_DOCUMENT_FORMAT = {
PACKAGE_PARTY_FORMAT = {
"partyType": "IND",
"roleType": "CLA",
"firstName": "",
"firstName": "FirstName",
"middleName": "",
"lastName": "",
"lastName": "LastName",
}
PACKAGE_FORMAT = {
@ -31,11 +31,10 @@ PACKAGE_FORMAT = {
"filingPackage": {
"documents": [],
"court": {
"location": "1211",
"level": "P",
"courtClass": "F",
"location": "4801",
"level": "S",
"courtClass": "E",
"division": "I",
"fileNumber": "1234",
"participatingClass": "string"
},
"parties": []
@ -159,8 +158,7 @@ class EFilingHub:
# unavailable for a local eDivorce environment. Use an env specified mapping
# to figure out what we should pass through to eFiling Hub. This BCEID username
# needs to match with what you will be logging in with to the Test BCEID environment.
# return 'ade9f711-d8c5-402e-8f70-5f0a1d4cc181'
return '53993f22-be67-43b9-94f2-222eca1b3bf7'
return settings.EFILING_BCEID
return request.session.get('bcgov_userguid', None)
guid = _get_raw_bceid(request)
@ -208,8 +206,8 @@ class EFilingHub:
if bce_id is None:
raise PermissionDenied()
response = self._get_api(request, f'{self.api_base_url}/submission/documents', transaction_id, bce_id,
headers={}, files=files)
url = f'{self.api_base_url}/submission/documents'
response = self._get_api(request, url, transaction_id, bce_id, headers={}, files=files)
if response.status_code == 200:
response = json.loads(response.text)


+ 1
- 1
edivorce/settings/base.py View File

@ -191,7 +191,7 @@ EFILING_HUB_CLIENT_ID = env('EFILING_HUB_CLIENT_ID', 'abc')
EFILING_HUB_CLIENT_SECRET = env('EFILING_HUB_CLIENT_SECRET', 'abc')
EFILING_HUB_API_BASE_URL = env('EFILING_HUB_API_BASE_URL', 'https://efiling.gov.bc.ca')
EFILING_BCEID = env.dict('EFILING_BCEID', '', subcast=str)
EFILING_BCEID = env('EFILING_BCEID', '', subcast=str)
# Keycloak OpenID Connect settings
# Provided by mozilla-django-oidc


Loading…
Cancel
Save