Skip to content

Commit

Permalink
https://github.com/OpenBankProject/API-Manager/pull/67
Browse files Browse the repository at this point in the history
user None exception in users\views

verify warnings to check if start with https
  • Loading branch information
PengfeiLi0218 committed Feb 6, 2019
1 parent 331fcf7 commit ed35561
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions apimanager/apimanager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
'obp',
'consumers',
'users',
'branches',
'entitlementrequests',
'customers',
'metrics',
Expand Down Expand Up @@ -261,7 +260,7 @@
# App Name to aggregate metrics
API_EXPLORER_APP_NAME = 'xxx'


VERIFY = True if API_HOST.startswith("https") else False



Expand Down
1 change: 0 additions & 1 deletion apimanager/apimanager/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
url(r'^consumers/', include('consumers.urls')),
url(r'^entitlementrequests/', include('entitlementrequests.urls')),
url(r'^users/', include('users.urls')),
url(r'^branches/', include('branches.urls')),
url(r'^customers/', include('customers.urls')),
url(r'^metrics/', include('metrics.urls')),
url(r'^config/', include('config.urls')),
Expand Down
4 changes: 2 additions & 2 deletions apimanager/obp/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def call(self, method='GET', url='', payload=None):
time_start = time.time()
try:
if payload:
response = session.request(method, url, json=payload, verify=False)
response = session.request(method, url, json=payload, verify=settings.VERIFY)
else:
response = session.request(method, url, verify=False)
response = session.request(method, url, verify=settings.VERIFY)
except ConnectionError as err:
raise APIError(err)
time_end = time.time()
Expand Down
2 changes: 1 addition & 1 deletion apimanager/obp/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_authorization_url(self, callback_uri):
)
try:
url = settings.API_HOST + settings.OAUTH_TOKEN_PATH
response = session.fetch_request_token(url, verify=False)
response = session.fetch_request_token(url, verify=settings.VERIFY)
except (ValueError, TokenRequestDenied, ConnectionError) as err:
raise AuthenticatorError(err)
else:
Expand Down

0 comments on commit ed35561

Please sign in to comment.