This commit is contained in:
mike cullerton 2022-08-02 12:52:46 -04:00
parent ce0a0883cb
commit afa428bb97
3 changed files with 13 additions and 12 deletions

View File

@ -158,10 +158,11 @@ def validate_scope(token: Any) -> bool:
def api_login(uid: str, password: str, redirect_url: Optional[str] = None) -> dict:
"""Api_login."""
# TODO: Fix this! mac 20220801
token = PublicAuthenticationService().get_public_access_token(uid, password)
g.token = token
return token
# token:dict = PublicAuthenticationService().get_public_access_token(uid, password)
# g.token = token
#
# return token
return {}
def encode_auth_token(uid: str) -> str:

View File

@ -45,10 +45,10 @@ class BaseTest:
keycloak_client_secret_key,
)
@staticmethod
def get_public_access_token(username: str, password: str) -> dict:
"""Get_public_access_token."""
public_access_token = PublicAuthenticationService().get_public_access_token(
username, password
)
return public_access_token
# @staticmethod
# def get_public_access_token(username: str, password: str) -> dict:
# """Get_public_access_token."""
# public_access_token = PublicAuthenticationService().get_public_access_token(
# username, password
# )
# return public_access_token

View File

@ -12,7 +12,7 @@ from spiffworkflow_backend.services.authentication_service import (
class TestAuthentication(BaseTest):
"""TestAuthentication."""
def test_get_login_state(self):
def test_get_login_state(self) -> None:
"""Test_get_login_state."""
redirect_url = "http://example.com/"
state = PublicAuthenticationService.generate_state(redirect_url)