{"id":30442498,"url":"https://github.com/vaibhav-sinha/kong-java-client","last_synced_at":"2025-08-23T08:11:44.959Z","repository":{"id":39105595,"uuid":"94133456","full_name":"vaibhav-sinha/kong-java-client","owner":"vaibhav-sinha","description":"Java Client for Kong API Gateway configuration","archived":false,"fork":false,"pushed_at":"2019-03-13T16:50:56.000Z","size":124,"stargazers_count":77,"open_issues_count":3,"forks_count":46,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-07T04:44:11.832Z","etag":null,"topics":["api-gateway","client-library","java","java-client","kong","kong-java-client"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaibhav-sinha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-12T19:37:00.000Z","updated_at":"2025-05-26T04:18:54.000Z","dependencies_parsed_at":"2022-08-25T12:10:50.805Z","dependency_job_id":null,"html_url":"https://github.com/vaibhav-sinha/kong-java-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vaibhav-sinha/kong-java-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaibhav-sinha%2Fkong-java-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaibhav-sinha%2Fkong-java-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaibhav-sinha%2Fkong-java-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaibhav-sinha%2Fkong-java-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaibhav-sinha","download_url":"https://codeload.github.com/vaibhav-sinha/kong-java-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaibhav-sinha%2Fkong-java-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746030,"owners_count":24813535,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api-gateway","client-library","java","java-client","kong","kong-java-client"],"created_at":"2025-08-23T08:11:38.412Z","updated_at":"2025-08-23T08:11:44.951Z","avatar_url":"https://github.com/vaibhav-sinha.png","language":"Java","readme":"# Kong Java Client\n\n[Kong](https://getkong.org/) is a popular Open Source API Gateway. Kong Java Client makes it easy to configure the API Gateway through your code.\n\n## Installation\n\nThe artifact is available on Maven Central Repository and be downloaded by adding the following dependency in pom.xml\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.vaibhav-sinha\u003c/groupId\u003e\n        \u003cartifactId\u003ekong-java-client\u003c/artifactId\u003e\n        \u003cversion\u003e0.2.0\u003c/version\u003e\n    \u003c/dependency\u003e\n    \n## Usage\n\n    KongClient kongClient = new KongClient(\"http://localhost:8001\");\n    Consumer request = new Consumer();\n    request.setCustomId(\"1234-5678-9012\");\n    Consumer response = kongClient.getConsumerService().createConsumer(request);\n\nLook in the tests to find more examples.\n\n## Supported Plugins\n\nBesides the Admin APIs, Plugin configuration is also supported.\n\n### Authentication Plugins\n  * Basic Auth\n  * Key Auth\n  * HMAC Auth\n  * JWT Auth\n  * OAuth2\n  * LDAP\n\n### Security Plugins\n  * ACL\n  * IP Restriction\n\n### Traffic Control Plugins\n  * Rate Limiting\n  * Request Size Limiting\n  * Request Termination\n\nOnly those plugins are supported which might need configuration through code. For example, adding rate limit for a new consumer when there is a new signup. Plugins which require one time configuration are not supported.\n\n### Example Usage\n\nTo add credentials for a new Consumer for Basic Auth\n\n    kongClient.getBasicAuthService().addCredentials(\"con-su-mer-id\", \"username\", \"password\");\n\n    \nTo add OAuth2 Plugin for an API\n\n    //See: RetrofitApiPluginServiceTest.java\n    kongClient.getApiPluginService().addPluginForApi(API_NAME, oauth2Plugin);\n    \nTo add an Application for a Consumer for OAuth2\n\n    //See: RetrofitOAuth2ManageServiceTest.java\n    kongClient.getOAuth2ManageService().createConsumerApplication(CONSUMER_ID, \n        new Application(appName, appRedirectUrl, appClientId, appClientSecret));\n        \nTo do the OAuth2 Process (Authorization Code)\n\n    //See: RetrofitOAuth2ProcessServiceTest.java\n    kongClient.getOAuth2ProcessService().authorize(API_URI, authorizationRequest);\n    kongClient.getOAuth2ProcessService().grantToken(API_URI, grantTokenRequest)\n","funding_links":[],"categories":["API网关"],"sub_categories":["Spring Cloud框架"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaibhav-sinha%2Fkong-java-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaibhav-sinha%2Fkong-java-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaibhav-sinha%2Fkong-java-client/lists"}