{"id":15068296,"url":"https://github.com/pdmlab/express-accesstoken-validation","last_synced_at":"2026-01-03T12:03:05.625Z","repository":{"id":66175057,"uuid":"53886465","full_name":"PDMLab/express-accesstoken-validation","owner":"PDMLab","description":"ExpressJS middleware for remote access token validation","archived":false,"fork":false,"pushed_at":"2018-09-12T07:36:42.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T23:46:59.865Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PDMLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-03-14T19:42:44.000Z","updated_at":"2018-09-12T07:36:43.000Z","dependencies_parsed_at":"2023-02-20T23:15:59.689Z","dependency_job_id":null,"html_url":"https://github.com/PDMLab/express-accesstoken-validation","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/PDMLab%2Fexpress-accesstoken-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDMLab%2Fexpress-accesstoken-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDMLab%2Fexpress-accesstoken-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDMLab%2Fexpress-accesstoken-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PDMLab","download_url":"https://codeload.github.com/PDMLab/express-accesstoken-validation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243833560,"owners_count":20355292,"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":[],"created_at":"2024-09-25T01:33:38.443Z","updated_at":"2026-01-03T12:03:05.530Z","avatar_url":"https://github.com/PDMLab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# express-accesstoken-validation\nExpressJS middleware for remote access token validation\n\nAlthough JWT have become common use in OAuth 2.0 / OpenId Connect scenarios, there a scenarios where you as an resource server (=API) have to validate an access token received by the client.    \nThis validation normally is delegated to the OAuth 2.0 server which created that access token.\n\n```express-accesstoken-validation``` is an ExpressJS middleware that lets you delegate the access token validation to an OAuth 2.0 server like [oauth2-server](https://www.npmjs.com/package/oauth2-server).\n\n## Installation\n\n```\nnpm install express-accesstoken-validation --save\n```\n\n## API\n\n```JavaScript\nconst bearerTokenValidation = require('express-accesstoken-validation');\n\nlet options = {\n  validationUri: 'https://localhost:3000/oauth/tokenvalidation',\n  tokenParam: 'token',\n  unprotected: ['/public']\n}\n\napp.use(bearerTokenValidation(options));\n```\n\n```options``` provides this options:\n\n* ```validationUri```: The access token validation uri of the OAuth 2.0 server\n* ```tokenParam```: The name of the token query parameter expected by the OAuth 2.0 server\n* ```unprotected```: optional, a list of routes that should not be protected\n\nMake sure to register ```express-accesstoken-validation``` as the first middleware to ensure all requests get authorized.\n\n## Running the tests\n```\nnpm test\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdmlab%2Fexpress-accesstoken-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdmlab%2Fexpress-accesstoken-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdmlab%2Fexpress-accesstoken-validation/lists"}