{"id":28076738,"url":"https://github.com/jaredhanson/oauth2orize-redelegate","last_synced_at":"2025-10-19T19:36:06.693Z","repository":{"id":13330314,"uuid":"16017234","full_name":"jaredhanson/oauth2orize-redelegate","owner":"jaredhanson","description":"Token redelegation and chaining exchange for OAuth2orize.","archived":false,"fork":false,"pushed_at":"2019-05-25T21:20:25.000Z","size":32,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-13T01:49:03.799Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaredhanson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"jaredhanson","ko_fi":"jaredhanson"}},"created_at":"2014-01-18T02:04:22.000Z","updated_at":"2020-08-30T16:31:35.000Z","dependencies_parsed_at":"2022-09-26T19:10:51.390Z","dependency_job_id":null,"html_url":"https://github.com/jaredhanson/oauth2orize-redelegate","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Foauth2orize-redelegate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Foauth2orize-redelegate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Foauth2orize-redelegate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Foauth2orize-redelegate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredhanson","download_url":"https://codeload.github.com/jaredhanson/oauth2orize-redelegate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856615,"owners_count":21974576,"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":"2025-05-13T01:49:09.318Z","updated_at":"2025-10-19T19:36:01.674Z","avatar_url":"https://github.com/jaredhanson.png","language":"JavaScript","funding_links":["https://patreon.com/jaredhanson","https://ko-fi.com/jaredhanson"],"categories":[],"sub_categories":[],"readme":"# oauth2orize-redelegate\n\nToken redelegation and chaining exchange for [OAuth2orize](https://github.com/jaredhanson/oauth2orize).\n\nThis exchange is used by a resource server to exchange an access token it has\nrecieved from a client for a derivative token for use with another resource\nserver.  This scenario facilitiates service chaining, in which one service needs\nto communicate with another service in order to fulfill the original request.\n\nStatus:\n[![Version](https://img.shields.io/npm/v/oauth2orize-redelegate.svg?label=version)](https://www.npmjs.com/package/oauth2orize-redelegate)\n[![Build](https://img.shields.io/travis/jaredhanson/oauth2orize-redelegate.svg)](https://travis-ci.org/jaredhanson/oauth2orize-redelegate)\n[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/oauth2orize-redelegate.svg?label=quality)](https://codeclimate.com/github/jaredhanson/oauth2orize-redelegate)\n[![Coverage](https://img.shields.io/coveralls/jaredhanson/oauth2orize-redelegate.svg)](https://coveralls.io/r/jaredhanson/oauth2orize-redelegate)\n[![Dependencies](https://img.shields.io/david/jaredhanson/oauth2orize-redelegate.svg)](https://david-dm.org/jaredhanson/oauth2orize-redelegate)\n\n\n## Install\n\n```bash\n$ npm install oauth2orize-redelegate\n```\n\n## Usage\n\n#### Register Exchange\n\nRegister the exchange with a `Server` instance and implement the `issue`\ncallback:\n\n```js\nvar redelegate = require('oauth2orize-redelegate').exchange.redelegate;\n\nserver.exchange('urn:ietf:params:oauth:grant_type:redelegate', redelegate(function(client, token, scope, done) {\n  // TODO:\n  // 1. Verify the access token.\n  // 2. Ensure that the token is being exchanged by a resource server for which\n  //    it is intended.\n  // 3. Issue a deriviative token with equal or lesser scope.\n});\n```\n\n## Considerations\n\n#### Specification\n\nThis module is implemented based on [A Method of Bearer Token Redelegation and Chaining for OAuth 2](https://tools.ietf.org/html/draft-richer-oauth-chain-00),\ndraft version 00.  As a draft, the specification remains a work-in-progress and\nis *not* final.  The specification is under discussion within the [OAuth Working Group](https://datatracker.ietf.org/wg/oauth/about/)\nof the [IETF](https://www.ietf.org/).  Implementers are encouraged to track the\nprogress of this specification and update implementations as necessary.\nFurthermore, the implications of relying on non-final specifications should be\nunderstood prior to deployment.\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2014-2018 Jared Hanson \u003c[http://jaredhanson.net/](http://jaredhanson.net/)\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Foauth2orize-redelegate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredhanson%2Foauth2orize-redelegate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Foauth2orize-redelegate/lists"}