Skip to content

Commit bba2f29

Browse files
sam bachaiczechowskikiebzakthomseddonrenovate-bot
authored
v5.0.0-RC1
* Compute the correct redirect_uri in case of resource over denies access According to https://tools.ietf.org/html/rfc6749#section-4.1.2.1 once the redirect_uri & client_id is correct authorization server should inform the clinet, that user denied access. The change is to move validation of resource owner approval after the redirect_uri & client identifier validation so the correct redirect url is computed * Remove commented code * Note we're now also seeking reviewers * Update readme with link to v5-dev branch * Add renovate.json * Add link to examples repo. Closes oauthjs#571 * Update dependency bluebird to v3.7.2 * Update dependency jshint to v2.11.0 * Update dependency mocha to v3.5.3 * Update dependency sinon to v2.4.1 * Update dependency statuses to v1.5.0 * Update dependency basic-auth to v2 * Update node versions * Bump lodash from 4.17.4 to 4.17.15 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.4 to 4.17.15. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.4...4.17.15) Signed-off-by: dependabot[bot] <support@github.com> * Update dependency type-is to v1.6.18 * Update dependency should to v13 * add codecoverage and upgrade packages * Update dependency jshint to v2.11.1 * Drop support for node 4/6/8 and add tests for 14 * Update dependency sinon to v9 * Update dependency mocha to v7 * Release 3.0.2 🎉 * Release 3.0.2 🎉 * Revert "Drop support for node 4/6/8 and add tests for 14" This reverts commit b84778b. * Revert "Merge pull request oauthjs#596 from oauthjs/renovate/mocha-7.x" This reverts commit cb2bb88, reversing changes made to 6997303. * Revert "Merge pull request oauthjs#602 from oauthjs/renovate/sinon-9.x" This reverts commit 6997303, reversing changes made to b84778b. * Bump mocha and sinon to lastest versions supporting node v4 * Add testing for node v14 * Update readme with project status update * remove renovate in favour of dependabot * Add FUNDING.yml (oauthjs#630) * Updated .gitignore * Changed 'hasOwnProperty' call in Request * Changed 'hasOwnProperty' call in Response * set numArgs for promisify of generateAuthorizationCode * readme: Update Slack badge and link * fix: issue correct expiry dates for tokens oauthjs#444 related to a NodeJS (nodejs/node#7074) and furthermore V8 bug (https://bugs.chromium.org/p/v8/issues/detail?id=3637); replaced seconds calculation with milliseconds. * Merge pull request oauthjs#451 from razvanz/fix/validate-scope-on-authorize fix: validate requested scope on authorize request * Merge pull request oauthjs#491 from mattgrande/master docs: Ensure accessTokenExpiresAt is required * Merge pull request oauthjs#471 from smartrecruiters/fix-migration-documentaiton docs: Correct tokens time scale for 2.x to 3.x migration guide * Updated changelog * Tag 3.1.0-rc1 * 3.1.0 bump * Bump lodash from 4.17.15 to 4.17.19 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.19) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * v3.1.1 (oauthjs#636) * Bump jshint from 2.11.1 to 2.12.0 (oauthjs#640) Bumps [jshint](https://github.com/jshint/jshint) from 2.11.1 to 2.12.0. - [Release notes](https://github.com/jshint/jshint/releases) - [Changelog](https://github.com/jshint/jshint/blob/master/CHANGELOG.md) - [Commits](jshint/jshint@2.11.1...2.12.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Set WWW-Authenticate header for invalid requests This adds the WWW-Authenticate header for InvalidRequestError, InvalidTokenError, and InsufficientScopeError, as specified in RFC 6750, Section 3 Fixes oauthjs#553 * cherry pick * rm lock * fix: lint erros * fix grant types * custom types init * Update .travis.yml * git merge artifact Co-authored-by: Igor Czechowski <i.czechowski@smartrecruiters.com> Co-authored-by: Szymon Kiebzak <s.kiebzak@smartrecruiters.com> Co-authored-by: Thom Seddon <thom@seddonmedia.co.uk> Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Aras Abbasi <aras.abbasi@googlemail.com> Co-authored-by: mjsalinger <mjsalinger@gmail.com> Co-authored-by: Pritilender <sajn_ap@live.com> Co-authored-by: nkzawa <naoyuki.kanezawa@gmail.com> Co-authored-by: Max Truxa <dev@maxtruxa.com> Co-authored-by: Razvan <razvanz@users.noreply.github.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Jonas Hermsmeier <jonas.hermsmeier@klarna.com>
1 parent 5efbab9 commit bba2f29

File tree

176 files changed

+7245
-439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+7245
-439
lines changed

.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: thomseddon
2+

.gitignore

+39-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88
# misc
99
npm-debug.log
10+
1011
# folders
11-
/dist
12+
#/dist
1213
/node_modules
1314
docs/_build/
1415
__pycache__/
@@ -17,3 +18,40 @@ __pycache__/
1718
.DS_Store
1819
*.pyc
1920
/aio
21+
22+
# codecoverage
23+
/.nyc_output
24+
/coverage
25+
lib-cov
26+
*.seed
27+
*.log
28+
*.csv
29+
*.dat
30+
*.out
31+
*.pid
32+
*.gz
33+
*.iml
34+
35+
.idea
36+
.jshint
37+
.DS_Store
38+
39+
pids
40+
logs
41+
results
42+
43+
lib/dockerImage/keys
44+
coverage
45+
npm-debug.log*~
46+
\#*\#
47+
/.emacs.desktop
48+
/.emacs.desktop.lock
49+
.elc
50+
auto-save-list
51+
tramp
52+
.\#*
53+
54+
# Org-mode
55+
.org-id-locations
56+
*_archive
57+

.nycrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "@istanbuljs/nyc-config-typescript",
3+
"all": true,
4+
"reporter": [
5+
"lcovonly",
6+
"html",
7+
"text",
8+
"text-summary"
9+
]
10+
}

.patch

Whitespace-only changes.

.travis.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
21
# travis
32
os: linux
43
dist: xenial
54

5+
66
language: node_js
77
node_js:
88
- '10'
99
- '12'
1010

1111
git:
1212
quiet: true
13+
14+
install: npm install
15+
16+
scripts: true
17+

CHANGELOG.md

-167
This file was deleted.

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# oauth2-server
23

34
[![npm Version][npm-image]][npm-url]
@@ -8,6 +9,7 @@
89

910
Complete, compliant and well tested module for implementing an OAuth2 server in [Node.js](https://nodejs.org).
1011

12+
Note: After a period of hiatus, this project is now back under active maintenance. Dependencies have been updated and bug fixes will land in v3 (current master). v4 will be _mostly backwards compatible_ with no code changes required for users using a supported node release. More details in [#621](https://github.com/oauthjs/node-oauth2-server/issues/621).
1113

1214
## Installation
1315

@@ -36,7 +38,7 @@ The *oauth2-server* module is framework-agnostic but there are several officiall
3638

3739
Most users should refer to our [Express](https://github.com/oauthjs/express-oauth-server/tree/master/examples) or [Koa](https://github.com/oauthjs/koa-oauth-server/tree/master/examples) examples.
3840

39-
Examples for v3 are yet to be made.
41+
More examples can be found here: https://github.com/14gasher/oauth-example
4042

4143
## Upgrading from 2.x
4244

dist/index.d.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export * from './lib/errors';
2+
export * from './lib/grant-types';
3+
export * from './lib/handlers';
4+
export * from './lib/interfaces';
5+
export { Request } from './lib/request';
6+
export { Response } from './lib/response';
7+
export * from './lib/response-types';
8+
export { OAuth2Server } from './lib/server';
9+
export * from './lib/token-types';
10+
export * from './lib/validator/is';

dist/index.js

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/constants/common.d.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export declare const MILLISECONDS_PER_SECOND = 1000;
2+
export declare const SECONDS_PER_MINUTE = 60;
3+
export declare const MINUTES_PER_HOUR = 60;
4+
export declare const HOURS_PER_DAY = 24;
5+
export declare const DAYS_PER_WEEK = 7;
6+
export declare const MONTHS_PER_YEAR = 12;
7+
export declare const SECOND = 1000;
8+
export declare const MINUTE: number;
9+
export declare const HOUR: number;
10+
export declare const DAY: number;
11+
export declare const WEEK: number;

dist/lib/constants/common.js

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/constants/common.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/constants/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './common';

dist/lib/constants/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/constants/index.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { OAuthError } from './oauth-error';
2+
export declare class AccessDeniedError extends OAuthError {
3+
constructor(message?: string | Error, properties?: any);
4+
}

dist/lib/errors/access-denied-error.js

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/errors/access-denied-error.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/errors/index.d.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export { AccessDeniedError } from './access-denied-error';
2+
export { InsufficientScopeError } from './insufficient-scope-error';
3+
export { InvalidArgumentError } from './invalid-argument-error';
4+
export { InvalidClientError } from './invalid-client-error';
5+
export { InvalidGrantError } from './invalid-grant-error';
6+
export { InvalidRequestError } from './invalid-request-error';
7+
export { InvalidScopeError } from './invalid-scope-error';
8+
export { InvalidTokenError } from './invalid-token-error';
9+
export { OAuthError } from './oauth-error';
10+
export { ServerError } from './server-error';
11+
export { UnauthorizedClientError } from './unauthorized-client-error';
12+
export { UnauthorizedRequestError } from './unauthorized-request-error';
13+
export { UnsupportedGrantTypeError } from './unsupported-grant-type-error';
14+
export { UnsupportedResponseTypeError } from './unsupported-response-type-error';

0 commit comments

Comments
 (0)