mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[auth,aad] add freerdp* argument to callback
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user