Skip to content

Commit

Permalink
-> Disable controlled access
Browse files Browse the repository at this point in the history
  • Loading branch information
s-paquette committed Aug 1, 2024
1 parent c50b910 commit 766e2dd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
12 changes: 6 additions & 6 deletions accounts/dcf_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@

logger = logging.getLogger(__name__)

DCF_TOKEN_URL = settings.DCF_TOKEN_URL
DCF_GOOGLE_URL = settings.DCF_GOOGLE_URL
DCF_URL_URL = settings.DCF_URL_URL
DCF_REVOKE_URL = settings.DCF_REVOKE_URL
DCF_REFRESH_LOG_NAME = settings.DCF_REFRESH_LOG_NAME
DCF_TOKEN_URL = None
DCF_GOOGLE_URL = None
DCF_URL_URL = None
DCF_REVOKE_URL = None
DCF_REFRESH_LOG_NAME = None

class DCFCommFailure(Exception):
"""Thrown if we have problems communicating with DCF """
Expand Down Expand Up @@ -832,7 +832,7 @@ def calc_expiration_time(returned_expiration_str):
exp_secs = float(returned_expiration_str)
returned_expiration_time = pytz.utc.localize(datetime.datetime.utcfromtimestamp(exp_secs))

login_expiration_seconds = settings.DCF_LOGIN_EXPIRATION_SECONDS
login_expiration_seconds = None
calc_expiration_time = pytz.utc.localize(datetime.datetime.utcnow() + datetime.timedelta(
seconds=login_expiration_seconds))
if returned_expiration_time:
Expand Down
2 changes: 1 addition & 1 deletion accounts/dcf_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def oauth2_callback(request):
#

try:
resp = dcf.get(settings.DCF_KEY_URL)
resp = dcf.get(None)
except Exception as e:
logger.error("[ERROR] Could not retrieve key from DCF")
logger.exception(e)
Expand Down
4 changes: 2 additions & 2 deletions accounts/sa_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

logger = logging.getLogger(__name__)

LOG_NAME_ERA_LOGIN_VIEW = settings.LOG_NAME_ERA_LOGIN_VIEW
IDP = settings.IDP
LOG_NAME_ERA_LOGIN_VIEW = None
IDP = None


class SAModes(object):
Expand Down
13 changes: 0 additions & 13 deletions accounts/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,6 @@
urlpatterns = [
url(r'^', include(google_urls)),
url(r'^', include(allauth_urls)),
# url(r'^logout', account_views.logout, name='account_logout'),
url(r'^logout', views.extended_logout_view, name='account_logout'),
# url(r'^login/$', google_views.oauth2_login, name='account_login'),
# Following urls for new DCF flows
url(r'^dcf_login/$', dcf_views.oauth2_login, name='dcf_login'),
url(r'^dcf_simple_logout/$', dcf_views.dcf_simple_logout, name='dcf_simple_logout'),
url(r'^dcf/login/callback/$', dcf_views.oauth2_callback, name='dcf_callback'),
url(r'^dcf_link_callback/$', dcf_views.dcf_link_callback, name='dcf_link_callback'),
url(r'^dcf_link_extend/$', dcf_views.dcf_link_extend, name='dcf_link_extend'),
url(r'^dcf_disconnect_user/$', dcf_views.dcf_disconnect_user, name='dcf_disconnect_user'),
# Following urls for QC and development use. Not used in production
# url(r'^dcf_user_data/$', dcf_views.dcf_get_user_data, name='dcf_get_user_data'),
# url(r'^dcf_unlink/$', dcf_views.dcf_unlink, name='dcf_unlink'),
# url(r'^dcf_link_redo/$', dcf_views.dcf_link_redo, name='dcf_link_redo'),
]

0 comments on commit 766e2dd

Please sign in to comment.