char *config_section;
char *authz_url;
- //Get the idp URL parameter
+ // Get the idp URL parameter
GNUNET_CRYPTO_hash ("idp", strlen ("idp"), &hc);
if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_contains (con_handle
->url_param_map,
return;
}
idp = GNUNET_CONTAINER_multihashmap_get (con_handle->url_param_map, &hc);
- //Get the idp config setting
+ // Get the idp config setting
GNUNET_asprintf (&config_section, "reclaim-idp-%s", idp);
if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg,
config_section,
GNUNET_SCHEDULER_add_now (&do_error, handle);
return;
}
- //FIXME add PKCE challenge
- //FIXME store ego, pkce (and state for redirect back?)
- //FIXME do we want to read client id, secret etc from config separately?
+ // FIXME add PKCE challenge
+ // FIXME store ego, pkce (and state for redirect back?)
+ // FIXME do we want to read client id, secret etc from config separately?
handle->response_code = MHD_HTTP_FOUND;
- //TODO add location header with authz url
+ // TODO add location header with authz url
//
resp = GNUNET_REST_create_response (NULL);
MHD_add_response_header (resp, "Location", authz_url);
{
struct GNUNET_REST_RequestHandlerError err;
static const struct GNUNET_REST_RequestHandler handlers[] =
- { { MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_ATTESTATION_OPENID, &handle_login },
+ { { MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_ATTESTATION_OPENID,
+ &handle_login },
{ MHD_HTTP_METHOD_OPTIONS, GNUNET_REST_API_NS_ATTESTATION, &options_cont },
GNUNET_REST_HANDLER_END };
*/
static void
get_ego (void *cls,
- struct GNUNET_IDENTITY_Ego *ego,
- void **ctx,
- const char *identifier)
+ struct GNUNET_IDENTITY_Ego *ego,
+ void **ctx,
+ const char *identifier)
{
struct RequestHandle *handle = cls;
handle->proc_cls = proc_cls;
handle->proc = proc;
handle->rest_handle = rest_handle;
- //Get the id URL parameter
+ // Get the id URL parameter
GNUNET_CRYPTO_hash ("ego", strlen ("ego"), &hc);
if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_contains (rest_handle
->url_param_map,
GNUNET_SCHEDULER_add_now (&do_error, handle);
return;
}
- handle->ego_name = GNUNET_CONTAINER_multihashmap_get (rest_handle->url_param_map, &hc);
+ handle->ego_name = GNUNET_CONTAINER_multihashmap_get (
+ rest_handle->url_param_map, &hc);
handle->url = GNUNET_strdup (rest_handle->url);
if (handle->url[strlen (handle->url) - 1] == '/')
handle->url[strlen (handle->url) - 1] = '\0';
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connecting...\n");
handle->namestore_handle = GNUNET_NAMESTORE_connect (cfg);
- //handle->timeout_task = FIXME
+ // handle->timeout_task = FIXME
// GNUNET_SCHEDULER_add_delayed (handle->timeout, &do_timeout, handle);
handle->identity_handle = GNUNET_IDENTITY_connect (cfg, &get_ego, handle);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n");