GUACAMOLE-2273: Implement FreeRDP AuthenticateEx callback and handle deprecation of Authenticate callback.#670
Open
necouchman wants to merge 1 commit into
Open
Conversation
…deprecation of Authenticate callback.
Contributor
Author
|
@mike-jumper @corentin-soriano @sschiffli Anyone do a quick review of this? |
| * by the connection owner does not support the "required" instruction then the | ||
| * connection will fail. This function always returns true. This callback is for | ||
| * the AuthenticateEx version, which also provides the "reason" field, indicating | ||
| * the type of authentication used to |
Member
There was a problem hiding this comment.
I think the end of the sentence is missing.
Comment on lines
+363
to
+381
| static BOOL rdp_freerdp_authenticate_ex(freerdp* instance, char** username, | ||
| char** password, char** domain, rdp_auth_reason reason) { | ||
|
|
||
| rdpContext* context = GUAC_RDP_CONTEXT(instance); | ||
| guac_client* client = ((rdp_freerdp_context*) context)->client; | ||
| guac_rdp_client* rdp_client = (guac_rdp_client*) client->data; | ||
| guac_rdp_settings* settings = rdp_client->settings; | ||
| char* params[4] = {NULL}; | ||
| int i = 0; | ||
|
|
||
| /* If the client does not support the "required" instruction, warn and | ||
| * quit. | ||
| */ | ||
| if (!guac_client_owner_supports_required(client)) { | ||
| guac_client_log(client, GUAC_LOG_WARNING, "Client does not support the " | ||
| "\"required\" instruction. No authentication parameters will " | ||
| "be requested."); | ||
| return TRUE; | ||
| } |
Member
There was a problem hiding this comment.
Part of the code in rdp_freerdp_authenticate_ex seems to be redundant with rdp_freerdp_authenticate. Perhaps we could extract the common part?
Contributor
Author
There was a problem hiding this comment.
I'll take a look and see what might make sense. It's a little tricky because the newer function is broken up by the switch statement trying to check for the type of authentication that is being requested, but there are still probably a couple of items that could become static functions and shared by both versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request implements the
AuthenticateExcallback for FreeRDP, and handles versions of FreeRDP where theAuthenticatecallback has been deprecated and compiled out.