{"id":18282516,"url":"https://github.com/constlab/vesper-jwt-auth","last_synced_at":"2025-04-09T05:25:27.999Z","repository":{"id":57103777,"uuid":"144581810","full_name":"constlab/vesper-jwt-auth","owner":"constlab","description":null,"archived":false,"fork":false,"pushed_at":"2020-07-16T08:24:38.000Z","size":146,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-26T14:41:50.678Z","etag":null,"topics":["graphql","jwt","jwt-auth","typescript","vesper"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/constlab.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}},"created_at":"2018-08-13T13:13:16.000Z","updated_at":"2021-07-17T21:30:00.000Z","dependencies_parsed_at":"2022-08-20T20:10:57.299Z","dependency_job_id":null,"html_url":"https://github.com/constlab/vesper-jwt-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/constlab%2Fvesper-jwt-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constlab%2Fvesper-jwt-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constlab%2Fvesper-jwt-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constlab%2Fvesper-jwt-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/constlab","download_url":"https://codeload.github.com/constlab/vesper-jwt-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247982997,"owners_count":21028225,"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":["graphql","jwt","jwt-auth","typescript","vesper"],"created_at":"2024-11-05T13:05:25.830Z","updated_at":"2025-04-09T05:25:27.965Z","avatar_url":"https://github.com/constlab.png","language":"TypeScript","readme":"# Vesper JWT Auth\n\n[![Build Status](https://travis-ci.org/constlab/vesper-jwt-auth.svg?branch=master)](https://travis-ci.org/constlab/vesper-jwt-auth)\n\n## Early access. Not for production use\n\n## Initial setup\n\n1. `npm i @constlab/vesper-jwt-auth`\n2. Add `AuthModule` to bootstrap\n3. Add `UserRepository` to DI container\n4. Add authorization checker function\n5. Add salt to parameters (see https://github.com/vesper-framework/vesper/blob/master/src/options/SchemaBuilderOptions.ts#L85)\n\n ```typescript\n import { AuthModule, jwtAuthorizationCheck } from \"@constlab/vesper-jwt-auth\";\n \n bootstrap({\n\tport: 3000,\n\tparameters: {\n\t\t\"salt\": \"\u003crandom string\u003e\"\n\t},\n\tmodules: [AuthModule, UserModule],\n\tsetupContainer: async (container, action) =\u003e {\n\t\tcontainer.set(\"user.repository\", getRepository(User));\n\t},\n\tauthorizationChecker: (roles: string[], action) =\u003e jwtAuthorizationCheck(roles, action)\n});\n ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconstlab%2Fvesper-jwt-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconstlab%2Fvesper-jwt-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconstlab%2Fvesper-jwt-auth/lists"}