From bc209b6295344f7640c994ddc759533de3c7dbbb Mon Sep 17 00:00:00 2001 From: Danielle Mayabb Date: Thu, 30 Nov 2023 09:36:15 -0800 Subject: [PATCH] Add totp param to passthrough to oauth - Add totp so that users with 2FA will be able to use this service --- web/services/loginService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/services/loginService.php b/web/services/loginService.php index be0dd49f8..93129a6f5 100644 --- a/web/services/loginService.php +++ b/web/services/loginService.php @@ -56,6 +56,11 @@ $requestUri = ConfigurationParametersManager::getParameter('OIDC_TOKEN_ENDPOINT'); $ch = curl_init(); $params = "username=" . $userLogin . "&password=" . $userPassword . "&grant_type=password&client_id=" . $clientId . "&client_secret=" . $clientSecret; + if(isset($_GET['totp'])){ + $totp = $_GET['totp']; + $params = $params . '&totp=' . $totp; + } + $headers = array( "Content-type: application/x-www-form-urlencoded" );