{"id":15374886,"url":"https://github.com/babelouest/iddawc","last_synced_at":"2025-05-07T22:31:30.162Z","repository":{"id":44197076,"uuid":"226758155","full_name":"babelouest/iddawc","owner":"babelouest","description":"[PROJECT CLOSED] - OAuth2/OIDC Client and RP library","archived":true,"fork":false,"pushed_at":"2024-11-11T12:35:21.000Z","size":3865,"stargazers_count":62,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-19T01:47:52.080Z","etag":null,"topics":["c","oauth2","oauth2-client","oidc"],"latest_commit_sha":null,"homepage":"https://babelouest.github.io/iddawc/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/babelouest.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-09T01:17:29.000Z","updated_at":"2024-11-11T12:35:51.000Z","dependencies_parsed_at":"2023-09-26T01:22:58.104Z","dependency_job_id":"0bebf2a3-bfc3-4edd-b9cc-45e44ba89fb4","html_url":"https://github.com/babelouest/iddawc","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babelouest%2Fiddawc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babelouest%2Fiddawc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babelouest%2Fiddawc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babelouest%2Fiddawc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babelouest","download_url":"https://codeload.github.com/babelouest/iddawc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965573,"owners_count":21832917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","oauth2","oauth2-client","oidc"],"created_at":"2024-10-01T14:00:04.770Z","updated_at":"2025-05-07T22:31:29.500Z","avatar_url":"https://github.com/babelouest.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iddawc\n\n## NOTICE: This project is no longer being maintained. ⚠️\n\nThis project is now closed for me, I have no time nor motivation to maintain it, so I prefer closing this repository.\n\n## Disclaimer\n\nThis library is a personal project mostly developped by myself on my free time, with gracious help from users.\n\nIt also relies on libraries that have the same flaw, and please note that I have less time to work on it. So be careful on how you use this library.\n\n## OAuth2/OIDC Client and Relying Party library\n\nHandles the OAuth2 and OpenID Connect authentication process flow from the client side.\n- Generates requests based on input parameters\n- Parses response\n- Validates response values\n\nSupported response_types: `code`, `token`, `id_token`, `password`, `client_credentials`, `refresh_token`, `device_code`\n\nSupported client authentication methods: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`\n\nSupported features:\n- [Proof Key for Code Exchange by OAuth Public Clients](https://tools.ietf.org/html/rfc7636)\n- [Token introspection (RFC 7662)](https://tools.ietf.org/html/rfc7662)\n- [Token revocation (RFC 7009)](https://tools.ietf.org/html/rfc7009)\n- [OpenID Connect Dynamic Registration](http://openid.net/specs/openid-connect-registration-1_0.html)\n- [OAuth 2.0 Dynamic Client Registration Protocol](https://tools.ietf.org/html/rfc7591)\n- [OAuth 2.0 Dynamic Client Registration Management Protocol](https://tools.ietf.org/html/rfc7592)\n- [OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP) Draft 07](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-dpop-07)\n- [OAuth 2.0 Rich Authorization Requests Draft 11](https://www.ietf.org/archive/id/draft-ietf-oauth-rar-11.html)\n- [OAuth 2.0 Pushed Authorization Requests](https://datatracker.ietf.org/doc/html/rfc9126)\n- [JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens](https://datatracker.ietf.org/doc/html/rfc9068)\n- [Messages encryption](https://openid.net/specs/openid-connect-core-1_0.html#Encryption)\n\nExample for `code` and `id_token` response types on an OpenID Connect server.\n\n```C\n/**\n * Compile with\n * gcc -o test_iddawc test_iddawc.c -liddawc\n */\n#include \u003cstdio.h\u003e\n#include \u003ciddawc.h\u003e\n\nint main() {\n  struct _i_session i_session;\n\n  i_init_session(\u0026i_session);\n  i_set_parameter_list(\u0026i_session, I_OPT_RESPONSE_TYPE, I_RESPONSE_TYPE_ID_TOKEN|I_RESPONSE_TYPE_CODE,\n                                   I_OPT_OPENID_CONFIG_ENDPOINT, \"https://oidc.tld/.well-known/openid-configuration\",\n                                   I_OPT_CLIENT_ID, \"client1\",\n                                   I_OPT_CIENT_SECRET, \"mySecret\",\n                                   I_OPT_REDIRECT_URI, \"https://my-client.tld\",\n                                   I_OPT_SCOPE, \"openid\",\n                                   I_OPT_STATE_GENERATE, 16,\n                                   I_OPT_NONCE_GENERATE, 32,\n                                   I_OPT_NONE);\n  if (i_get_openid_config(\u0026i_session)) {\n    fprintf(stderr, \"Error loading openid-configuration\\n\");\n    i_clean_session(\u0026i_session);\n    return 1;\n  }\n\n  // First step: get redirection to login page\n  if (i_build_auth_url_get(\u0026i_session)) {\n    fprintf(stderr, \"Error building auth request\\n\");\n    i_clean_session(\u0026i_session);\n    return 1;\n  }\n  printf(\"Redirect to: %s\\n\", i_get_str_parameter(\u0026i_session, I_OPT_REDIRECT_TO));\n\n  // When the user has logged in the external application, gets redirected with a result, we parse the result\n  fprintf(stdout, \"Enter redirect URL\\n\");\n  fgets(redirect_to, 4096, stdin);\n  redirect_to[strlen(redirect_to)-1] = '\\0';\n  i_set_str_parameter(\u0026i_session, I_OPT_REDIRECT_TO, redirect_to);\n  if (i_parse_redirect_to(\u0026i_session) != I_OK) {\n    fprintf(stderr, \"Error parsing redirect_to url\\n\");\n    i_clean_session(\u0026i_session);\n    return 1;\n  }\n\n  // Run the token request, get the refresh and access tokens\n  if (i_run_token_request(\u0026i_session) != I_OK) {\n    fprintf(stderr, \"Error running token request\\n\");\n    i_clean_session(\u0026i_session);\n    return 1;\n  }\n  \n  // And finally we load user info using the access token\n  if (i_get_userinfo(\u0026i_session, 0) != I_OK) {\n    fprintf(stderr, \"Error loading userinfo\\n\");\n    i_clean_session(\u0026i_session);\n    return 1;\n  }\n\n  fprintf(stdout, \"userinfo:\\n%s\\n\", i_get_str_parameter(\u0026i_session, I_OPT_USERINFO));\n  \n  // Cleanup session\n  i_clean_session(\u0026i_session);\n\n  return 0;\n}\n```\n\n# Install\n\nIddawc is available in the following distributions.\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/iddawc.svg)](https://repology.org/project/iddawc/versions)\n\n## Dependencies\n\nIddawc is based on [GnuTLS](https://www.gnutls.org/), [Jansson](http://www.digip.org/jansson/), [zlib](https://www.zlib.net/), [libmicrohttpd](https://www.gnu.org/software/libmicrohttpd/), [libcurl](https://curl.haxx.se/libcurl/) and libsystemd (if possible), you must install those libraries first before building Iddawc.\n\nGnuTLS 3.6 minimum is required for JWT signed with `ECDSA`, `Ed25519 (EDDSA)` and `RSA-PSS` signatures.\n\n## Prerequisites\n\nYou need [Orcania](https://github.com/babelouest/orcania), [Yder](https://github.com/babelouest/yder), [Ulfius](https://github.com/babelouest/ulfius) and [Rhonabwy](https://github.com/babelouest/rhonabwy).\n\n## Manual install\n\n### CMake - Multi architecture\n\n[CMake](https://cmake.org/download/) minimum 3.5 is required.\n\nLast Iddawc release: [https://github.com/babelouest/iddawc/releases/latest/](https://github.com/babelouest/iddawc/releases/latest/)\n\nRun the CMake script in a sub-directory, example:\n\n```shell\n$ cd \u003ciddawc_source\u003e\n$ mkdir build\n$ cd build\n$ cmake ..\n$ make \u0026\u0026 sudo make install\n```\n\nThe available options for CMake are:\n- `-DWITH_JOURNALD=[on|off]` (default `on`): Build with journald (SystemD) support\n- `-DBUILD_IDWCC=[on|off]` (default `on`): Build idwcc\n- `-BUILD_IDDAWC_TESTING=[on|off]` (default `off`): Build unit tests\n- `-DINSTALL_HEADER=[on|off]` (default `on`): Install header file `iddawc.h`\n- `-DBUILD_RPM=[on|off]` (default `off`): Build RPM package when running `make package`\n- `-DCMAKE_BUILD_TYPE=[Debug|Release]` (default `Release`): Compile with debugging symbols or not\n\n### Good ol' Makefile\n\nDownload Iddawc from GitHub repository, compile and install.\n\nLast Iddawc release: [https://github.com/babelouest/iddawc/releases/latest/](https://github.com/babelouest/iddawc/releases/latest/)\n\n```shell\n$ cd iddawc/src\n$ make\n$ sudo make install\n```\n\nBy default, the shared library and the header file will be installed in the `/usr/local` location. To change this setting, you can modify the `DESTDIR` value in the `src/Makefile`.\n\nExample: install Iddawc in /tmp/lib directory\n\n```shell\n$ cd src\n$ make \u0026\u0026 make DESTDIR=/tmp install\n```\n\nYou can install Iddawc without root permission if your user has write access to `$(DESTDIR)`.\nA `ldconfig` command is executed at the end of the install, it will probably fail if you don't have root permission, but this is harmless.\nIf you choose to install Iddawc in another directory, you must set your environment variable `LD_LIBRARY_PATH` properly.\n\n# API Documentation\n\nDocumentation is available in the documentation page: [https://babelouest.github.io/iddawc/](https://babelouest.github.io/iddawc/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabelouest%2Fiddawc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabelouest%2Fiddawc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabelouest%2Fiddawc/lists"}