{"id":36616307,"url":"https://github.com/swiftinc/kong-plugin-swift-auth","last_synced_at":"2026-01-12T09:11:54.888Z","repository":{"id":245178858,"uuid":"817213559","full_name":"swiftinc/kong-plugin-swift-auth","owner":"swiftinc","description":"Kong API Gateway plugin for Swift OAuth token","archived":false,"fork":false,"pushed_at":"2025-01-15T11:29:07.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-15T13:23:36.259Z","etag":null,"topics":["kong","kong-gateway","kong-plugin","oauth2"],"latest_commit_sha":null,"homepage":"https://developer.swift.com","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swiftinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.pdf","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":"2024-06-19T08:46:43.000Z","updated_at":"2025-01-15T11:28:19.000Z","dependencies_parsed_at":"2024-06-20T10:09:22.107Z","dependency_job_id":null,"html_url":"https://github.com/swiftinc/kong-plugin-swift-auth","commit_stats":null,"previous_names":["swiftinc/kong-plugin-swift-auth"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/swiftinc/kong-plugin-swift-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftinc%2Fkong-plugin-swift-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftinc%2Fkong-plugin-swift-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftinc%2Fkong-plugin-swift-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftinc%2Fkong-plugin-swift-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swiftinc","download_url":"https://codeload.github.com/swiftinc/kong-plugin-swift-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftinc%2Fkong-plugin-swift-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["kong","kong-gateway","kong-plugin","oauth2"],"created_at":"2026-01-12T09:11:54.829Z","updated_at":"2026-01-12T09:11:54.881Z","avatar_url":"https://github.com/swiftinc.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Test](https://github.com/swiftinc/kong-plugin-swift-auth/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/swiftinc/kong-plugin-swift-auth/actions/workflows/test.yml)\n[![Lint](https://github.com/swiftinc/kong-plugin-swift-auth/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/swiftinc/kong-plugin-swift-auth/actions/workflows/lint.yml)\n\n# Kong Swift OAuth plugin\n\nThis plugin requests a Swift OAuth2 token and adds the retrieved OAuth access token into\nthe HTTP Authorization header of proxied requests.\n\n## Table of contents\n - [Requirements](#requirements)\n - [Testing](#testing)\n\n## Requirements\n\nPongo provides a simple way of testing Kong plugins. For a complete walkthrough [check this blogpost on the Kong website](https://konghq.com/blog/custom-lua-plugin-kong-gateway).\n\nRequired tools:\n\n* `docker-compose` (and hence `docker`)\n* `curl`\n* `realpath`, for older MacOS versions you need the [`coreutils`](https://www.gnu.org/software/coreutils/coreutils.html)\n  to be installed. This is easiest via the [Homebrew package manager](https://brew.sh/) by doing:\n  ```\n  brew install coreutils\n  ```\n* Depending on your environment you should set some [environment variables](#configuration).\n\n## Testing\n\n### Create an app\n[Create an application](https://developer.swift.com/myapps) and select the API products you want to use. `Payment Pre-validation API` and `gpi API` API products have to be selected\nto run the integrations tests.\n\n### Do a test run\n\nClone Pongo repository and install Pongo shell script:\n```\nPATH=$PATH:~/.local/bin\ngit clone https://github.com/Kong/kong-pongo.git\nmkdir -p ~/.local/bin\nln -s $(realpath kong-pongo/pongo.sh) ~/.local/bin/pongo\n```\n\nClone the plugin repository:\n\n```\ngit clone https://github.com/swiftinc/kong-plugin-swift-auth.git\ncd kong-plugin-swift-auth\n```\n   \nReplace the `__CONSUMER_KEY__` and `__CONSUMER_SECRET__` placeholders from the `spec/swift-auth/01-integration_spec.lua` with the values from the application created in the developer portal:\n\n```\n-- ############################################\n--      REPLACE BEFORE LAUNCHING THE TESTS\n-- ############################################\n\nlocal consumer_key = \"__CONSUMER_KEY__\"\nlocal consumer_secret = \"__CONSUMER_SECRET__\"\n      \n-- ############################################\n```\n\nAuto pull and build the test images:\n\n```\npongo run\n```\n\nTo directly access Kong from the host, `--expose` argument can be used expose the internal ports to the host:\n\n```\npongo run --expose\n```\n\nThe above command will automatically build the test image and start the test environment. When done, the test environment can be torn down by:\n\n```\npongo down\n```\n\nuse pongo pack to pack the plugin into a rock (no need to upload to LuaRocks)\nthen do pongo shell and in the shell do\n\npongo up --expose\nluarocks install /kong-plugin/kong-plugin-swift-auth-1.0.0-1.all.rock\nexport KONG_PLUGINS=bundled,kong-plugin-swift-auth\nkong migrations bootstrap\nkong reload\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftinc%2Fkong-plugin-swift-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftinc%2Fkong-plugin-swift-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftinc%2Fkong-plugin-swift-auth/lists"}