{"id":20887161,"url":"https://github.com/yosriady/serverless-auth","last_synced_at":"2025-06-26T16:09:39.827Z","repository":{"id":67375800,"uuid":"96494514","full_name":"yosriady/serverless-auth","owner":"yosriady","description":"Serverless Authorization example with JWT and AWS Custom Authorizers","archived":false,"fork":false,"pushed_at":"2020-07-14T05:43:25.000Z","size":111,"stargazers_count":80,"open_issues_count":3,"forks_count":21,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-12T19:43:29.978Z","etag":null,"topics":["serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"https://www.goingserverless.co","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yosriady.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2017-07-07T03:15:42.000Z","updated_at":"2024-11-21T21:48:21.000Z","dependencies_parsed_at":"2023-02-21T03:01:10.504Z","dependency_job_id":null,"html_url":"https://github.com/yosriady/serverless-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yosriady%2Fserverless-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yosriady%2Fserverless-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yosriady%2Fserverless-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yosriady%2Fserverless-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yosriady","download_url":"https://codeload.github.com/yosriady/serverless-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yosriady%2Fserverless-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258540126,"owners_count":22717334,"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":["serverless","serverless-framework"],"created_at":"2024-11-18T08:19:15.857Z","updated_at":"2025-06-26T16:09:39.811Z","avatar_url":"https://github.com/yosriady.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Auth\n\n\u003e Pangolins are a protected species!\n\n![Pangolins are protected species!](http://i.imgur.com/ReO39.jpg)\n\nThis is a serverless authorization example using JSON Web Tokens (JWTs.)\nIt has three endpoints:\n\n- `GET /cats` is a public endpoint anyone can access.\n- `GET /pangolins` is a private endpoint, protected by an AWS Custom Authorizer.\n- `POST /sessions` is a login endpoint. Pass a valid username and password in a JSON request body to get a JWT (see `/lib/users.js` for valid combinations.) For example:\n\n```\n{\n\t\"username\": \"Cthon98\",\n\t\"password\": \"hunter2\"\n}\n```\n\nIn order to pass the *authentication* check, you will need to supply a valid JWT in your `Authorization` request header when making calls to a protected endpoint.\n\nIn order to pass the *authorization* check, you will need a JWT belonging to a user with valid permissions. For this example, the user `Cthon98` is authorized to access `GET /pangolins`; `AzureDiamond` is not.\n\n## Setup\n\n### Prerequisites\n\n- Node.js \u0026 NPM\n- Yarn\n- [The Serverless Framework](https://serverless.com/framework/)\n\n### Install dependencies\n\n```\nyarn\n```\n\n### Running Tests\n\n```\nyarn test\n```\n\n### Get Test coverage\n\n```\nyarn test:coverage\n```\n\n### Lint\n\n```\nyarn eslint\n```\n\n### Running locally\n```\nserverless offline start\n```\n\n### Deploy\n\n```\nserverless deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyosriady%2Fserverless-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyosriady%2Fserverless-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyosriady%2Fserverless-auth/lists"}