[auth,aad] add freerdp* argument to callback

This commit is contained in:
akallabeth
2023-03-08 14:25:57 +01:00
committed by akallabeth
parent 4cbfa006f2
commit f5423caace
4 changed files with 6 additions and 4 deletions

View File

@@ -937,11 +937,12 @@ BOOL client_cli_present_gateway_message(freerdp* instance, UINT32 type, BOOL isD
return TRUE;
}
BOOL client_cli_get_aad_auth_code(const char* hostname, char** code)
BOOL client_cli_get_aad_auth_code(freerdp* instance, const char* hostname, char** code)
{
size_t len = 0;
char* p = NULL;
WINPR_ASSERT(instance);
WINPR_ASSERT(hostname);
WINPR_ASSERT(code);
*code = NULL;

View File

@@ -155,7 +155,8 @@ extern "C"
FREERDP_API int client_cli_logon_error_info(freerdp* instance, UINT32 data, UINT32 type);
FREERDP_API BOOL client_cli_get_aad_auth_code(const char* hostname, char** code);
FREERDP_API BOOL client_cli_get_aad_auth_code(freerdp* instance, const char* hostname,
char** code);
FREERDP_API void
freerdp_client_OnChannelConnectedEventHandler(void* context,

View File

@@ -139,7 +139,7 @@ extern "C"
char** domain, rdp_auth_reason reason);
typedef BOOL (*pChooseSmartcard)(freerdp* instance, SmartcardCertInfo** cert_list, DWORD count,
DWORD* choice, BOOL gateway);
typedef BOOL (*pGetAadAuthCode)(const char* hostname, char** code);
typedef BOOL (*pGetAadAuthCode)(freerdp* instance, const char* hostname, char** code);
/** @brief Callback used if user interaction is required to accept
* an unknown certificate.

View File

@@ -159,7 +159,7 @@ int aad_client_begin(rdpAad* aad)
LOG_ERROR_AND_GOTO(fail, "Unable to generate pop key");
/* Obtain an oauth authorization code */
if (!instance->GetAadAuthCode || !instance->GetAadAuthCode(aad->hostname, &auth_code))
if (!instance->GetAadAuthCode || !instance->GetAadAuthCode(instance, aad->hostname, &auth_code))
LOG_ERROR_AND_GOTO(fail, "Unable to obtain authorization code");
/* Set up an ssl connection to the authorization server */