-
-
Notifications
You must be signed in to change notification settings - Fork 927
V5.0 dev #564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V5.0 dev #564
Changes from all commits
f3ce1bb
0bff971
bd988da
b027643
2cd5e08
a4f99a1
cac41dd
8b31697
8b7d9da
de35cc1
28bdd3c
c13e9ea
58b08b5
6146cc7
038c90a
1aa302e
4600122
be5d69d
098ed84
737682a
e4ebd21
3a6abf6
c2e6a22
a29eb1a
fffd5f9
3ebcf71
412a3a6
e446c30
3366396
98d1dcb
b1bab59
52120fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,19 @@ | ||
node_modules/ | ||
|
||
# IDE | ||
/.idea | ||
/.awcache | ||
/.vscode/*.code-workspace | ||
/.vscode/settings.json | ||
|
||
nkitku marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# misc | ||
npm-debug.log | ||
# folders | ||
/dist | ||
/node_modules | ||
docs/_build/ | ||
__pycache__/ | ||
*.pyc | ||
lib-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
*.iml | ||
|
||
.idea | ||
.jshint | ||
# files | ||
.DS_Store | ||
|
||
pids | ||
logs | ||
results | ||
|
||
lib/dockerImage/keys | ||
coverage | ||
npm-debug.log*~ | ||
\#*\# | ||
/.emacs.desktop | ||
/.emacs.desktop.lock | ||
.elc | ||
auto-save-list | ||
tramp | ||
.\#* | ||
|
||
# Org-mode | ||
.org-id-locations | ||
*_archive | ||
*.pyc | ||
/aio |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"endOfLine": "lf" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- 6 | ||
- 7 | ||
- 8 | ||
- 9 | ||
- 10 | ||
- 12 | ||
|
||
nkitku marked this conversation as resolved.
Show resolved
Hide resolved
|
||
sudo: false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# VSCode Configuration | ||
|
||
This folder contains opt-in [Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings) and [Extension Recommendations](https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions) that our team recommends using when working on this repository. | ||
|
||
## Usage | ||
|
||
To use the recommended settings follow the steps below: | ||
|
||
- copy `.vscode/recommended-settings.json` to `.vscode/settings.json` | ||
- restart the editor | ||
|
||
If you already have your custom workspace settings you should instead manually merge the file content. | ||
|
||
This isn't an automatic process so you will need to repeat it when settings are updated. | ||
|
||
To see the recommended extensions select "Extensions: Show Recommended Extensions" in the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette). | ||
|
||
## Editing `.vscode/recommended-settings.json` | ||
|
||
If you wish to add extra configuration items please keep in mind any settings you add here will be used by many users. | ||
|
||
Try to keep these settings to things that help facilitate the development process and avoid altering the user workflow whenever possible. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
Comment on lines
+2
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be better in |
||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"editorconfig.editorconfig", | ||
"esbenp.prettier-vscode", | ||
"ms-vscode.vscode-typescript-tslint-plugin" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Mocha Tests", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | ||
"args": [ | ||
"--require", | ||
"ts-node/register", | ||
"-u", | ||
"tdd", | ||
"--timeout", | ||
"999999", | ||
"--colors", | ||
"--recursive", | ||
"${workspaceFolder}/test/**/*.spec.ts" | ||
], | ||
"internalConsoleOptions": "openOnSessionStart" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
nkitku marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.DS_Store": true, | ||
"**/node_modules": true, | ||
"dist": true | ||
}, | ||
"files.watcherExclude": { | ||
"**/.git/**": true, | ||
"**/node_modules/**": true, | ||
"**/dist/**": true | ||
}, | ||
"search.exclude": { | ||
"**/node_modules": true, | ||
"**/dist": true | ||
}, | ||
"editor.formatOnSave": false, | ||
"typescript.format.enable": false, | ||
"editor.formatOnPaste": false, | ||
"[typescript]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true, | ||
"source.fixAll.tslint": true | ||
} | ||
}, | ||
"[json]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[jsonc]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[javascript]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"prettier.singleQuote": true, | ||
"prettier.trailingComma": "all", | ||
"prettier.printWidth": 80 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
## Changelog | ||
|
||
### 5.0.0 | ||
* BREAKING: Remove support for node v6 | ||
* BREAKING: Remove support for callbacks only support native Promises | ||
* new: Rewrote in TypeScript | ||
* new: Switch from Eslint to Tslint | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. palantir/tslint#4534 getting deprecated |
||
* new: added .vscode folder for recommend extensions and recommend setting required for development | ||
* new: added suitable TypeScript Interfaces for various Objects | ||
|
||
### 4.0.0 | ||
* BREAKING: Set server_error Code to 500 | ||
* BREAKING: Remove support for node v4 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
Todo: | ||
✔ Add a todo | ||
✔ A Basic Rewrite of library in TypeScript | ||
✔ A Basic Rewrite of tests in TypeScript | ||
☐ Add examples for nestjs, expressjs, koa and others | ||
☐ Add Migration guide | ||
☐ Review all Docs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this really be part of the repository, or is it just a list of "personal todos?" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export * from './lib/errors'; | ||
export * from './lib/grant-types'; | ||
export * from './lib/handlers'; | ||
export * from './lib/interfaces'; | ||
export { Request } from './lib/request'; | ||
export { Response } from './lib/response'; | ||
export * from './lib/response-types'; | ||
export { OAuth2Server } from './lib/server'; | ||
nkitku marked this conversation as resolved.
Show resolved
Hide resolved
|
||
export * from './lib/token-types'; | ||
export * from './lib/validator/is'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export const MILLISECONDS_PER_SECOND = 1_000; | ||
nkitku marked this conversation as resolved.
Show resolved
Hide resolved
|
||
export const SECONDS_PER_MINUTE = 60; | ||
export const MINUTES_PER_HOUR = 60; | ||
export const HOURS_PER_DAY = 24; | ||
export const DAYS_PER_WEEK = 7; | ||
export const MONTHS_PER_YEAR = 12; | ||
|
||
export const SECOND = MILLISECONDS_PER_SECOND; | ||
export const MINUTE = SECONDS_PER_MINUTE * SECOND; | ||
export const HOUR = MINUTES_PER_HOUR * MINUTE; | ||
export const DAY = HOURS_PER_DAY * HOUR; | ||
export const WEEK = DAYS_PER_WEEK * DAY; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './common'; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { OAuthError } from './oauth-error'; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* "The resource owner or authorization server denied the request" | ||
* | ||
* @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 | ||
*/ | ||
|
||
export class AccessDeniedError extends OAuthError { | ||
constructor(message: string | Error = '', properties?: any) { | ||
super(message, { code: 400, name: 'access_denied', ...properties }); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export { AccessDeniedError } from './access-denied-error'; | ||
export { InsufficientScopeError } from './insufficient-scope-error'; | ||
export { InvalidArgumentError } from './invalid-argument-error'; | ||
export { InvalidClientError } from './invalid-client-error'; | ||
export { InvalidGrantError } from './invalid-grant-error'; | ||
export { InvalidRequestError } from './invalid-request-error'; | ||
export { InvalidScopeError } from './invalid-scope-error'; | ||
export { InvalidTokenError } from './invalid-token-error'; | ||
export { OAuthError } from './oauth-error'; | ||
export { ServerError } from './server-error'; | ||
export { UnauthorizedClientError } from './unauthorized-client-error'; | ||
export { UnauthorizedRequestError } from './unauthorized-request-error'; | ||
export { UnsupportedGrantTypeError } from './unsupported-grant-type-error'; | ||
export { UnsupportedResponseTypeError } from './unsupported-response-type-error'; |
Uh oh!
There was an error while loading. Please reload this page.