Skip to content

Commit

Permalink
Modified CustomAuthentication.authenticate comment to satisfy flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Tignor authored and Thomas Tignor committed Dec 15, 2023
1 parent 4bf8957 commit 761e4eb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tdrs-backend/tdpservice/users/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@
from rest_framework.authentication import BaseAuthentication
from rest_framework.request import Request
import logging
import os
logger = logging.getLogger(__name__)

class CustomAuthentication(BaseAuthentication):
"""Define authentication and get user functions for custom authentication."""

@staticmethod
def authenticate(request=None, username=None, login_gov_uuid=None, hhs_id=None):
""" HACK
This method currently needs to support two unrelated workflows.
References:
tdpservice/users/api/login.py:TokenAuthorizationOIDC.handleUser
https://www.django-rest-framework.org/api-guide/authentication
"""
"""Authenticate user with the request and username."""
# HACK: This method currently needs to support two unrelated workflows.
# References:
# tdpservice/users/api/login.py:TokenAuthorizationOIDC.handleUser
# https://www.django-rest-framework.org/api-guide/authentication
if type(request) == Request:
username = request.data.get('username')
logging.debug(f"CustomAuthentication::authenticate: {request} {request.data} "
Expand Down

0 comments on commit 761e4eb

Please sign in to comment.