str_append(dest, "\tsuccessful");
if (request->mech_name != NULL)
auth_str_add_keyvalue(dest, "mech", request->mech_name);
+ if (request->client_id != NULL)
+ auth_str_add_keyvalue(dest, "client_id", request->client_id);
/* export passdb extra fields */
auth_request_export_fields(dest, request->extra_fields, "passdb_");
/* export any userdb fields */
request->session_id = p_strdup(request->pool, value);
else if (strcmp(key, "debug") == 0)
request->debug = TRUE;
+ else if (strcmp(key, "client_id") == 0)
+ request->client_id = p_strdup(request->pool, value);
else
return FALSE;
/* NOTE: keep in sync with auth_request_export() */
time_t delay_until;
pid_t session_pid;
- const char *service, *mech_name, *session_id, *local_name;
+ const char *service, *mech_name, *session_id, *local_name, *client_id;
struct ip_addr local_ip, remote_ip, real_local_ip, real_remote_ip;
in_port_t local_port, remote_port, real_local_port, real_remote_port;
str_append(str, "\tlocal_name=");
str_append_tabescaped(str, info->local_name);
}
+ if (info->client_id != NULL &&
+ *info->client_id != '\0') {
+ str_append(str, "\tclient_id=");
+ str_append_tabescaped(str, info->client_id);
+ }
if (info->initial_resp_base64 != NULL) {
str_append(str, "\tresp=");
str_append_tabescaped(str, info->initial_resp_base64);
const char *session_id;
const char *cert_username;
const char *local_name;
+ const char *client_id;
enum auth_request_flags flags;
struct ip_addr local_ip, remote_ip, real_local_ip, real_remote_ip;
const struct master_service_ssl_settings *ssl_set;
const char *session_id, *listener_name, *postlogin_socket_path;
const char *local_name;
+ string_t *client_id;
int fd;
struct istream *input;
/* Copyright (c) 2002-2017 Dovecot authors, see the included COPYING file */
#include "login-common.h"
+#include "str.h"
#include "base64.h"
#include "buffer.h"
#include "hex-binary.h"
info.real_remote_ip = client->real_remote_ip;
info.real_local_port = client->real_local_port;
info.real_remote_port = client->real_remote_port;
+ if (client->client_id != NULL)
+ info.client_id = str_c(client->client_id);
info.initial_resp_base64 = initial_resp_base64;
client->auth_request =