Skip to content

Commit

Permalink
Add totp param to passthrough to oauth
Browse files Browse the repository at this point in the history
- Add totp so that users with 2FA will be able to use this service
  • Loading branch information
dmtrek14 committed Nov 30, 2023
1 parent 8143613 commit bc209b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/services/loginService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);
Expand Down

0 comments on commit bc209b6

Please sign in to comment.