mike-jumper commented on a change in pull request #232: GUACAMOLE-514: 
Implement additional VNC authentication support
URL: https://github.com/apache/guacamole-server/pull/232#discussion_r312562997
 
 

 ##########
 File path: src/protocols/vnc/auth.c
 ##########
 @@ -31,3 +31,19 @@ char* guac_vnc_get_password(rfbClient* client) {
     return ((guac_vnc_client*) gc->data)->settings->password;
 }
 
+rfbCredential* guac_vnc_get_credentials(rfbClient* client, int credentialType) 
{
+    guac_client* gc = rfbClientGetClientData(client, GUAC_VNC_CLIENT_KEY);
+    guac_vnc_settings* settings = ((guac_vnc_client*) gc->data)->settings;
+    
+    if (credentialType == rfbCredentialTypeUser) {
+        rfbCredential *creds = malloc(sizeof(rfbCredential));
+        creds->userCredential.username = settings->username;
+        creds->userCredential.password = settings->password;
+        return creds;
+    }
+    
+    guac_client_log(gc, GUAC_LOG_ERROR,
+            "Unsupported credential type requested.");
 
 Review comment:
   I haven't looked into the behavior of libvncclient with respect to this 
callback. Is a request for an unsupported credential type an error? Or is it 
something which is expected to occur when a VNC server supports multiple 
authentication mechanisms, not all of which are necessarily supported by the 
client?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to