RDEV-1648 update for curlHandler method.
This commit is contained in:
parent
123000dd5c
commit
50ebd99241
@ -230,7 +230,7 @@ char *curlHandler(pam_handle_t *pamh, char *jsonObj, char *url, char *secretKey)
|
||||
responseXRublon = curlResponseSignatureParser(pamh, size, chunks.memory);
|
||||
if(!verifyData(pamh, curlResponse, secretKey, responseXRublon)) {
|
||||
pam_prompt(pamh, PAM_TEXT_INFO, NULL, "Invalid Signature!");
|
||||
return NULL;
|
||||
return curlResponse;
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
if(chunks.memory)
|
||||
@ -307,6 +307,11 @@ int postInit(pam_handle_t *pamh, cJSON **availableMethods, struct ApplicationInf
|
||||
info->companyName = parseNestedJson(curlResponse, "result","companyName");
|
||||
info->applicationName = parseNestedJson(curlResponse, "result", "applicationName");
|
||||
|
||||
if(strcmp(status,"ERROR") == 0) {
|
||||
if(transactionErrorException(pamh,curlResponse))
|
||||
return STATUS_DENIED;
|
||||
}
|
||||
|
||||
if(gdprAccepted != 1 || tosAccepted != 1) {
|
||||
pam_prompt(pamh, PAM_TEXT_INFO, NULL, "\nYou have to read and accept our:\n- Terms of Use: https://core.rublon.net/terms_of_use\n- Privacy Policy: https://core.rublon.net/privacy_policy\n");
|
||||
do{
|
||||
@ -317,10 +322,6 @@ int postInit(pam_handle_t *pamh, cJSON **availableMethods, struct ApplicationInf
|
||||
return STATUS_WAITING;
|
||||
}
|
||||
|
||||
if(strcmp(status,"ERROR") == 0) {
|
||||
if(transactionErrorException(pamh,curlResponse))
|
||||
return STATUS_DENIED;
|
||||
}
|
||||
if(transactionStatus == NULL || transactionId == NULL) {
|
||||
pam_prompt(pamh, PAM_TEXT_INFO, NULL, "\nRublon Transaction Error!");
|
||||
return STATUS_BYPASS;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user