aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/plugin_rest_openid_connect.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
committerChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
commit7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch)
treebdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/reclaim/plugin_rest_openid_connect.c
parent01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff)
downloadgnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz
gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip
tighten formatting rules
Diffstat (limited to 'src/reclaim/plugin_rest_openid_connect.c')
-rw-r--r--src/reclaim/plugin_rest_openid_connect.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c
index a4a368ab5..92a1de621 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -576,6 +576,7 @@ cleanup_handle (struct RequestHandle *handle)
576 GNUNET_free (handle); 576 GNUNET_free (handle);
577} 577}
578 578
579
579static void 580static void
580cleanup_handle_delayed (void *cls) 581cleanup_handle_delayed (void *cls)
581{ 582{
@@ -667,6 +668,7 @@ do_redirect_error (void *cls)
667 GNUNET_free (redirect); 668 GNUNET_free (redirect);
668} 669}
669 670
671
670/** 672/**
671 * Task run on timeout, sends error message. Cleans up everything. 673 * Task run on timeout, sends error message. Cleans up everything.
672 * 674 *
@@ -681,6 +683,7 @@ do_timeout (void *cls)
681 do_error (handle); 683 do_error (handle);
682} 684}
683 685
686
684/** 687/**
685 * Return attributes for claim 688 * Return attributes for claim
686 * 689 *
@@ -817,6 +820,7 @@ cookie_identity_interpretation (struct RequestHandle *handle)
817 GNUNET_free (cookies); 820 GNUNET_free (cookies);
818} 821}
819 822
823
820/** 824/**
821 * Redirects to login page stored in configuration file 825 * Redirects to login page stored in configuration file
822 */ 826 */
@@ -868,6 +872,7 @@ login_redirect (void *cls)
868 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle); 872 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
869} 873}
870 874
875
871/** 876/**
872 * Does internal server error when iteration failed. 877 * Does internal server error when iteration failed.
873 */ 878 */
@@ -943,6 +948,7 @@ oidc_ticket_issue_cb (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
943 GNUNET_free (code_string); 948 GNUNET_free (code_string);
944} 949}
945 950
951
946static void 952static void
947oidc_collect_finished_cb (void *cls) 953oidc_collect_finished_cb (void *cls)
948{ 954{
@@ -1226,6 +1232,7 @@ client_redirect (void *cls)
1226 handle); 1232 handle);
1227} 1233}
1228 1234
1235
1229static char * 1236static char *
1230get_url_parameter_copy (const struct RequestHandle *handle, const char *key) 1237get_url_parameter_copy (const struct RequestHandle *handle, const char *key)
1231{ 1238{
@@ -1358,6 +1365,7 @@ build_authz_response (void *cls)
1358 GNUNET_SCHEDULER_add_now (&client_redirect, handle); 1365 GNUNET_SCHEDULER_add_now (&client_redirect, handle);
1359} 1366}
1360 1367
1368
1361/** 1369/**
1362 * Iterate over tlds in config 1370 * Iterate over tlds in config
1363 */ 1371 */
@@ -1377,6 +1385,7 @@ tld_iter (void *cls, const char *section, const char *option, const char *value)
1377 handle->tld = GNUNET_strdup (option + 1); 1385 handle->tld = GNUNET_strdup (option + 1);
1378} 1386}
1379 1387
1388
1380/** 1389/**
1381 * Responds to authorization GET and url-encoded POST request 1390 * Responds to authorization GET and url-encoded POST request
1382 * 1391 *
@@ -1452,6 +1461,7 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
1452 GNUNET_SCHEDULER_add_now (&build_authz_response, handle); 1461 GNUNET_SCHEDULER_add_now (&build_authz_response, handle);
1453} 1462}
1454 1463
1464
1455/** 1465/**
1456 * Combines an identity with a login time and responds OK to login request 1466 * Combines an identity with a login time and responds OK to login request
1457 * 1467 *
@@ -1522,6 +1532,7 @@ login_cont (struct GNUNET_REST_RequestHandle *con_handle,
1522 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle); 1532 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
1523} 1533}
1524 1534
1535
1525static int 1536static int
1526check_authorization (struct RequestHandle *handle, 1537check_authorization (struct RequestHandle *handle,
1527 struct GNUNET_CRYPTO_EcdsaPublicKey *cid) 1538 struct GNUNET_CRYPTO_EcdsaPublicKey *cid)
@@ -1640,6 +1651,7 @@ check_authorization (struct RequestHandle *handle,
1640 return GNUNET_OK; 1651 return GNUNET_OK;
1641} 1652}
1642 1653
1654
1643const struct EgoEntry * 1655const struct EgoEntry *
1644find_ego (struct RequestHandle *handle, 1656find_ego (struct RequestHandle *handle,
1645 struct GNUNET_CRYPTO_EcdsaPublicKey *test_key) 1657 struct GNUNET_CRYPTO_EcdsaPublicKey *test_key)
@@ -1657,6 +1669,7 @@ find_ego (struct RequestHandle *handle,
1657 return NULL; 1669 return NULL;
1658} 1670}
1659 1671
1672
1660static void 1673static void
1661persist_access_token (const struct RequestHandle *handle, 1674persist_access_token (const struct RequestHandle *handle,
1662 const char *access_token, 1675 const char *access_token,
@@ -1676,6 +1689,7 @@ persist_access_token (const struct RequestHandle *handle,
1676 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); 1689 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
1677} 1690}
1678 1691
1692
1679/** 1693/**
1680 * Responds to token url-encoded POST request 1694 * Responds to token url-encoded POST request
1681 * 1695 *
@@ -1841,6 +1855,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
1841 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle); 1855 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
1842} 1856}
1843 1857
1858
1844/** 1859/**
1845 * Collects claims and stores them in handle 1860 * Collects claims and stores them in handle
1846 */ 1861 */
@@ -1866,6 +1881,7 @@ consume_ticket (void *cls,
1866 GNUNET_free (tmp_value); 1881 GNUNET_free (tmp_value);
1867} 1882}
1868 1883
1884
1869/** 1885/**
1870 * Responds to userinfo GET and url-encoded POST request 1886 * Responds to userinfo GET and url-encoded POST request
1871 * 1887 *
@@ -2002,6 +2018,7 @@ init_cont (struct RequestHandle *handle)
2002 } 2018 }
2003} 2019}
2004 2020
2021
2005/** 2022/**
2006 * If listing is enabled, prints information about the egos. 2023 * If listing is enabled, prints information about the egos.
2007 * 2024 *
@@ -2108,6 +2125,7 @@ list_ego (void *cls,
2108 } 2125 }
2109} 2126}
2110 2127
2128
2111static void 2129static void
2112rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle, 2130rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle,
2113 GNUNET_REST_ResultProcessor proc, 2131 GNUNET_REST_ResultProcessor proc,
@@ -2140,6 +2158,7 @@ rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle,
2140 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n"); 2158 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n");
2141} 2159}
2142 2160
2161
2143/** 2162/**
2144 * Entry point for the plugin. 2163 * Entry point for the plugin.
2145 * 2164 *
@@ -2213,4 +2232,5 @@ libgnunet_plugin_rest_openid_connect_done (void *cls)
2213 return NULL; 2232 return NULL;
2214} 2233}
2215 2234
2235
2216/* end of plugin_rest_openid_connect.c */ 2236/* end of plugin_rest_openid_connect.c */