adapt-authoring-auth-local 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +1 -1
- package/.eslintrc +14 -14
- package/.github/ISSUE_TEMPLATE/bug_report.yml +55 -55
- package/.github/ISSUE_TEMPLATE/feature_request.yml +22 -22
- package/.github/dependabot.yml +11 -11
- package/.github/pull_request_template.md +25 -25
- package/.github/workflows/labelled_prs.yml +16 -16
- package/.github/workflows/new.yml +19 -19
- package/.github/workflows/releases.yml +25 -0
- package/adapt-authoring.json +5 -5
- package/conf/config.schema.json +84 -84
- package/errors/errors.json +58 -58
- package/index.js +6 -6
- package/lib/LocalAuthModule.js +331 -331
- package/lib/PasswordUtils.js +173 -173
- package/lib/apidefs.js +195 -195
- package/package.json +59 -24
- package/schema/localauthuser.schema.json +42 -42
- package/schema/localpassword.schema.json +12 -12
package/.eslintignore
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
node_modules
|
|
1
|
+
node_modules
|
package/.eslintrc
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": false,
|
|
4
|
-
"node": true,
|
|
5
|
-
"commonjs": false,
|
|
6
|
-
"es2020": true
|
|
7
|
-
},
|
|
8
|
-
"extends": [
|
|
9
|
-
"standard"
|
|
10
|
-
],
|
|
11
|
-
"parserOptions": {
|
|
12
|
-
"ecmaVersion": 2020
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": false,
|
|
4
|
+
"node": true,
|
|
5
|
+
"commonjs": false,
|
|
6
|
+
"es2020": true
|
|
7
|
+
},
|
|
8
|
+
"extends": [
|
|
9
|
+
"standard"
|
|
10
|
+
],
|
|
11
|
+
"parserOptions": {
|
|
12
|
+
"ecmaVersion": 2020
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
name: Bug Report
|
|
2
|
-
description: File a bug report
|
|
3
|
-
labels: ["bug"]
|
|
4
|
-
body:
|
|
5
|
-
- type: markdown
|
|
6
|
-
attributes:
|
|
7
|
-
value: |
|
|
8
|
-
Thanks for taking the time to fill out this bug report!
|
|
9
|
-
- type: textarea
|
|
10
|
-
id: description
|
|
11
|
-
attributes:
|
|
12
|
-
label: What happened?
|
|
13
|
-
description: Please describe the issue
|
|
14
|
-
validations:
|
|
15
|
-
required: true
|
|
16
|
-
- type: textarea
|
|
17
|
-
id: expected
|
|
18
|
-
attributes:
|
|
19
|
-
label: Expected behaviour
|
|
20
|
-
description: Tell us what should have happened
|
|
21
|
-
- type: textarea
|
|
22
|
-
id: repro-steps
|
|
23
|
-
attributes:
|
|
24
|
-
label: Steps to reproduce
|
|
25
|
-
description: Tell us how to reproduce the issue
|
|
26
|
-
validations:
|
|
27
|
-
required: true
|
|
28
|
-
- type: input
|
|
29
|
-
id: aat-version
|
|
30
|
-
attributes:
|
|
31
|
-
label: Authoring tool version
|
|
32
|
-
description: What version of the Adapt authoring tool are you running?
|
|
33
|
-
validations:
|
|
34
|
-
required: true
|
|
35
|
-
- type: input
|
|
36
|
-
id: fw-version
|
|
37
|
-
attributes:
|
|
38
|
-
label: Framework version
|
|
39
|
-
description: What version of the Adapt framework are you running?
|
|
40
|
-
- type: dropdown
|
|
41
|
-
id: browsers
|
|
42
|
-
attributes:
|
|
43
|
-
label: What browsers are you seeing the problem on?
|
|
44
|
-
multiple: true
|
|
45
|
-
options:
|
|
46
|
-
- Firefox
|
|
47
|
-
- Chrome
|
|
48
|
-
- Safari
|
|
49
|
-
- Microsoft Edge
|
|
50
|
-
- type: textarea
|
|
51
|
-
id: logs
|
|
52
|
-
attributes:
|
|
53
|
-
label: Relevant log output
|
|
54
|
-
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
|
55
|
-
render: sh
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: File a bug report
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for taking the time to fill out this bug report!
|
|
9
|
+
- type: textarea
|
|
10
|
+
id: description
|
|
11
|
+
attributes:
|
|
12
|
+
label: What happened?
|
|
13
|
+
description: Please describe the issue
|
|
14
|
+
validations:
|
|
15
|
+
required: true
|
|
16
|
+
- type: textarea
|
|
17
|
+
id: expected
|
|
18
|
+
attributes:
|
|
19
|
+
label: Expected behaviour
|
|
20
|
+
description: Tell us what should have happened
|
|
21
|
+
- type: textarea
|
|
22
|
+
id: repro-steps
|
|
23
|
+
attributes:
|
|
24
|
+
label: Steps to reproduce
|
|
25
|
+
description: Tell us how to reproduce the issue
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: input
|
|
29
|
+
id: aat-version
|
|
30
|
+
attributes:
|
|
31
|
+
label: Authoring tool version
|
|
32
|
+
description: What version of the Adapt authoring tool are you running?
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
35
|
+
- type: input
|
|
36
|
+
id: fw-version
|
|
37
|
+
attributes:
|
|
38
|
+
label: Framework version
|
|
39
|
+
description: What version of the Adapt framework are you running?
|
|
40
|
+
- type: dropdown
|
|
41
|
+
id: browsers
|
|
42
|
+
attributes:
|
|
43
|
+
label: What browsers are you seeing the problem on?
|
|
44
|
+
multiple: true
|
|
45
|
+
options:
|
|
46
|
+
- Firefox
|
|
47
|
+
- Chrome
|
|
48
|
+
- Safari
|
|
49
|
+
- Microsoft Edge
|
|
50
|
+
- type: textarea
|
|
51
|
+
id: logs
|
|
52
|
+
attributes:
|
|
53
|
+
label: Relevant log output
|
|
54
|
+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
|
55
|
+
render: sh
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
name: Feature request
|
|
2
|
-
description: Request a new feature
|
|
3
|
-
labels: ["enhancement"]
|
|
4
|
-
body:
|
|
5
|
-
- type: markdown
|
|
6
|
-
attributes:
|
|
7
|
-
value: |
|
|
8
|
-
Thanks for taking the time to request a new feature in the Adapt authoring tool! The Adapt team will consider all new feature requests, but unfortunately cannot commit to every one.
|
|
9
|
-
- type: textarea
|
|
10
|
-
id: description
|
|
11
|
-
attributes:
|
|
12
|
-
label: Feature description
|
|
13
|
-
description: Please describe your feature request
|
|
14
|
-
validations:
|
|
15
|
-
required: true
|
|
16
|
-
- type: checkboxes
|
|
17
|
-
id: contribute
|
|
18
|
-
attributes:
|
|
19
|
-
label: Can you work on this feature?
|
|
20
|
-
description: If you are able to commit your own time to work on this feature, it will greatly increase the liklihood of it being implemented by the core dev team. Otherwise, it will be triaged and prioritised alongside the core team's current priorities.
|
|
21
|
-
options:
|
|
22
|
-
- label: I can contribute
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Request a new feature
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for taking the time to request a new feature in the Adapt authoring tool! The Adapt team will consider all new feature requests, but unfortunately cannot commit to every one.
|
|
9
|
+
- type: textarea
|
|
10
|
+
id: description
|
|
11
|
+
attributes:
|
|
12
|
+
label: Feature description
|
|
13
|
+
description: Please describe your feature request
|
|
14
|
+
validations:
|
|
15
|
+
required: true
|
|
16
|
+
- type: checkboxes
|
|
17
|
+
id: contribute
|
|
18
|
+
attributes:
|
|
19
|
+
label: Can you work on this feature?
|
|
20
|
+
description: If you are able to commit your own time to work on this feature, it will greatly increase the liklihood of it being implemented by the core dev team. Otherwise, it will be triaged and prioritised alongside the core team's current priorities.
|
|
21
|
+
options:
|
|
22
|
+
- label: I can contribute
|
package/.github/dependabot.yml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
updates:
|
|
8
|
-
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
-
directory: "/" # Location of package manifests
|
|
10
|
-
schedule:
|
|
11
|
-
interval: "weekly"
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
[//]: # (Please title your PR according to eslint commit conventions)
|
|
2
|
-
[//]: # (See https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint#eslint-convention for details)
|
|
3
|
-
|
|
4
|
-
[//]: # (Add a link to the original issue)
|
|
5
|
-
|
|
6
|
-
[//]: # (Delete as appropriate)
|
|
7
|
-
### Fix
|
|
8
|
-
* A sentence describing each fix
|
|
9
|
-
|
|
10
|
-
### Update
|
|
11
|
-
* A sentence describing each udpate
|
|
12
|
-
|
|
13
|
-
### New
|
|
14
|
-
* A sentence describing each new feature
|
|
15
|
-
|
|
16
|
-
### Breaking
|
|
17
|
-
* A sentence describing each breaking change
|
|
18
|
-
|
|
19
|
-
[//]: # (List appropriate steps for testing if needed)
|
|
20
|
-
### Testing
|
|
21
|
-
1. Steps for testing
|
|
22
|
-
|
|
23
|
-
[//]: # (Mention any other dependencies)
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
[//]: # (Please title your PR according to eslint commit conventions)
|
|
2
|
+
[//]: # (See https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint#eslint-convention for details)
|
|
3
|
+
|
|
4
|
+
[//]: # (Add a link to the original issue)
|
|
5
|
+
|
|
6
|
+
[//]: # (Delete as appropriate)
|
|
7
|
+
### Fix
|
|
8
|
+
* A sentence describing each fix
|
|
9
|
+
|
|
10
|
+
### Update
|
|
11
|
+
* A sentence describing each udpate
|
|
12
|
+
|
|
13
|
+
### New
|
|
14
|
+
* A sentence describing each new feature
|
|
15
|
+
|
|
16
|
+
### Breaking
|
|
17
|
+
* A sentence describing each breaking change
|
|
18
|
+
|
|
19
|
+
[//]: # (List appropriate steps for testing if needed)
|
|
20
|
+
### Testing
|
|
21
|
+
1. Steps for testing
|
|
22
|
+
|
|
23
|
+
[//]: # (Mention any other dependencies)
|
|
24
|
+
|
|
25
|
+
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
name: Add labelled PRs to project
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
types: [ labeled ]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
add-to-project:
|
|
9
|
-
if: ${{ github.event.label.name == 'dependencies' }}
|
|
10
|
-
name: Add to main project
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/add-to-project@v0.1.0
|
|
14
|
-
with:
|
|
15
|
-
project-url: https://github.com/orgs/adapt-security/projects/5
|
|
16
|
-
github-token: ${{ secrets.PROJECTS_SECRET }}
|
|
1
|
+
name: Add labelled PRs to project
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [ labeled ]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
add-to-project:
|
|
9
|
+
if: ${{ github.event.label.name == 'dependencies' }}
|
|
10
|
+
name: Add to main project
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/add-to-project@v0.1.0
|
|
14
|
+
with:
|
|
15
|
+
project-url: https://github.com/orgs/adapt-security/projects/5
|
|
16
|
+
github-token: ${{ secrets.PROJECTS_SECRET }}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
name: Add to main project
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
issues:
|
|
5
|
-
types:
|
|
6
|
-
- opened
|
|
7
|
-
pull_request:
|
|
8
|
-
types:
|
|
9
|
-
- opened
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
add-to-project:
|
|
13
|
-
name: Add to main project
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/add-to-project@v0.1.0
|
|
17
|
-
with:
|
|
18
|
-
project-url: https://github.com/orgs/adapt-security/projects/5
|
|
19
|
-
github-token: ${{ secrets.PROJECTS_SECRET }}
|
|
1
|
+
name: Add to main project
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issues:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
pull_request:
|
|
8
|
+
types:
|
|
9
|
+
- opened
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
add-to-project:
|
|
13
|
+
name: Add to main project
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/add-to-project@v0.1.0
|
|
17
|
+
with:
|
|
18
|
+
project-url: https://github.com/orgs/adapt-security/projects/5
|
|
19
|
+
github-token: ${{ secrets.PROJECTS_SECRET }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- master
|
|
6
|
+
jobs:
|
|
7
|
+
release:
|
|
8
|
+
name: Release
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- name: Checkout
|
|
12
|
+
uses: actions/checkout@v3
|
|
13
|
+
with:
|
|
14
|
+
fetch-depth: 0
|
|
15
|
+
- name: Setup Node.js
|
|
16
|
+
uses: actions/setup-node@v3
|
|
17
|
+
with:
|
|
18
|
+
node-version: 'lts/*'
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: npm ci
|
|
21
|
+
- name: Release
|
|
22
|
+
env:
|
|
23
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
24
|
+
NPM_TOKEN: ${{ secrets.AAT_NPM_TOKEN }}
|
|
25
|
+
run: npx semantic-release
|
package/adapt-authoring.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"documentation": {
|
|
3
|
-
"enable": true
|
|
4
|
-
}
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"documentation": {
|
|
3
|
+
"enable": true
|
|
4
|
+
}
|
|
5
|
+
}
|
package/conf/config.schema.json
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"saltRounds": {
|
|
6
|
-
"description": "The number of rounds performed when generating a password hash",
|
|
7
|
-
"type": "number",
|
|
8
|
-
"default": 10
|
|
9
|
-
},
|
|
10
|
-
"failsUntilTemporaryLock": {
|
|
11
|
-
"description": "The number of failed login attempts allowed before the account is locked for a short period of time",
|
|
12
|
-
"type": "number",
|
|
13
|
-
"default": 5
|
|
14
|
-
},
|
|
15
|
-
"failsUntilPermanentLock": {
|
|
16
|
-
"description": "The number of failed login attempts allowed before the account is permanently locked",
|
|
17
|
-
"type": "number",
|
|
18
|
-
"default": 20
|
|
19
|
-
},
|
|
20
|
-
"temporaryLockDuration": {
|
|
21
|
-
"description": "The amount of time a locked user must wait before attempting to log in again",
|
|
22
|
-
"type": "string",
|
|
23
|
-
"isTimeMs": true,
|
|
24
|
-
"default": "1m"
|
|
25
|
-
},
|
|
26
|
-
"resetTokenLifespan": {
|
|
27
|
-
"description": "The amount of time a password reset token remains valid for",
|
|
28
|
-
"type": "string",
|
|
29
|
-
"isTimeMs": true,
|
|
30
|
-
"default": "24h"
|
|
31
|
-
},
|
|
32
|
-
"inviteTokenLifespan": {
|
|
33
|
-
"description": "The amount of time an invite password reset token remains valid for",
|
|
34
|
-
"type": "string",
|
|
35
|
-
"isTimeMs": true,
|
|
36
|
-
"default": "7d"
|
|
37
|
-
},
|
|
38
|
-
"minPasswordLength": {
|
|
39
|
-
"description": "Minimum password length",
|
|
40
|
-
"type": "number",
|
|
41
|
-
"default": 8,
|
|
42
|
-
"_adapt": {
|
|
43
|
-
"isPublic": true
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"passwordMustHaveNumber": {
|
|
47
|
-
"description": "Whether the password must contain at least one number",
|
|
48
|
-
"type": "boolean",
|
|
49
|
-
"default": false,
|
|
50
|
-
"_adapt": {
|
|
51
|
-
"isPublic": true
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"passwordMustHaveUppercase": {
|
|
55
|
-
"description": "Whether the password must contain at least one uppercase character",
|
|
56
|
-
"type": "boolean",
|
|
57
|
-
"default": false,
|
|
58
|
-
"_adapt": {
|
|
59
|
-
"isPublic": true
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"passwordMustHaveLowercase": {
|
|
63
|
-
"description": "Whether the password must contain at least one lowercase character",
|
|
64
|
-
"type": "boolean",
|
|
65
|
-
"default": false,
|
|
66
|
-
"_adapt": {
|
|
67
|
-
"isPublic": true
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"passwordMustHaveSpecial": {
|
|
71
|
-
"description": "Whether the password must contain at least one special character",
|
|
72
|
-
"type": "boolean",
|
|
73
|
-
"default": false,
|
|
74
|
-
"_adapt": {
|
|
75
|
-
"isPublic": true
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"blacklistedPasswordValues": {
|
|
79
|
-
"description": "Values which cannot be used in passwords",
|
|
80
|
-
"type": "array",
|
|
81
|
-
"default": []
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"saltRounds": {
|
|
6
|
+
"description": "The number of rounds performed when generating a password hash",
|
|
7
|
+
"type": "number",
|
|
8
|
+
"default": 10
|
|
9
|
+
},
|
|
10
|
+
"failsUntilTemporaryLock": {
|
|
11
|
+
"description": "The number of failed login attempts allowed before the account is locked for a short period of time",
|
|
12
|
+
"type": "number",
|
|
13
|
+
"default": 5
|
|
14
|
+
},
|
|
15
|
+
"failsUntilPermanentLock": {
|
|
16
|
+
"description": "The number of failed login attempts allowed before the account is permanently locked",
|
|
17
|
+
"type": "number",
|
|
18
|
+
"default": 20
|
|
19
|
+
},
|
|
20
|
+
"temporaryLockDuration": {
|
|
21
|
+
"description": "The amount of time a locked user must wait before attempting to log in again",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"isTimeMs": true,
|
|
24
|
+
"default": "1m"
|
|
25
|
+
},
|
|
26
|
+
"resetTokenLifespan": {
|
|
27
|
+
"description": "The amount of time a password reset token remains valid for",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"isTimeMs": true,
|
|
30
|
+
"default": "24h"
|
|
31
|
+
},
|
|
32
|
+
"inviteTokenLifespan": {
|
|
33
|
+
"description": "The amount of time an invite password reset token remains valid for",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"isTimeMs": true,
|
|
36
|
+
"default": "7d"
|
|
37
|
+
},
|
|
38
|
+
"minPasswordLength": {
|
|
39
|
+
"description": "Minimum password length",
|
|
40
|
+
"type": "number",
|
|
41
|
+
"default": 8,
|
|
42
|
+
"_adapt": {
|
|
43
|
+
"isPublic": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"passwordMustHaveNumber": {
|
|
47
|
+
"description": "Whether the password must contain at least one number",
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"default": false,
|
|
50
|
+
"_adapt": {
|
|
51
|
+
"isPublic": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"passwordMustHaveUppercase": {
|
|
55
|
+
"description": "Whether the password must contain at least one uppercase character",
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"default": false,
|
|
58
|
+
"_adapt": {
|
|
59
|
+
"isPublic": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"passwordMustHaveLowercase": {
|
|
63
|
+
"description": "Whether the password must contain at least one lowercase character",
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"default": false,
|
|
66
|
+
"_adapt": {
|
|
67
|
+
"isPublic": true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"passwordMustHaveSpecial": {
|
|
71
|
+
"description": "Whether the password must contain at least one special character",
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"default": false,
|
|
74
|
+
"_adapt": {
|
|
75
|
+
"isPublic": true
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"blacklistedPasswordValues": {
|
|
79
|
+
"description": "Values which cannot be used in passwords",
|
|
80
|
+
"type": "array",
|
|
81
|
+
"default": []
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
package/errors/errors.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"ACCOUNT_LOCKED_PERM": {
|
|
3
|
-
"description": "User account has been permanently locked",
|
|
4
|
-
"statusCode": 401
|
|
5
|
-
},
|
|
6
|
-
"ACCOUNT_LOCKED_TEMP": {
|
|
7
|
-
"data": {
|
|
8
|
-
"remaining": "The amount of time remaining before account is unlocked"
|
|
9
|
-
},
|
|
10
|
-
"description": "User account has been temporarily locked",
|
|
11
|
-
"statusCode": 401
|
|
12
|
-
},
|
|
13
|
-
"ACCOUNT_NOT_LOCALAUTHD": {
|
|
14
|
-
"description": "Specified account is not authenticated with local auth",
|
|
15
|
-
"statusCode": 400
|
|
16
|
-
},
|
|
17
|
-
"BLACKLISTED_PASSWORD_VALUE": {
|
|
18
|
-
"description": "Password contains a blacklisted value",
|
|
19
|
-
"statusCode": 400
|
|
20
|
-
},
|
|
21
|
-
"INCORRECT_PASSWORD": {
|
|
22
|
-
"description": "Provided password does not match that stored",
|
|
23
|
-
"statusCode": 401
|
|
24
|
-
},
|
|
25
|
-
"INVALID_PASSWORD": {
|
|
26
|
-
"data": {
|
|
27
|
-
"errors": "The validation errors"
|
|
28
|
-
},
|
|
29
|
-
"description": "Password failed validation",
|
|
30
|
-
"statusCode": 400
|
|
31
|
-
},
|
|
32
|
-
"INVALID_PASSWORD_LENGTH": {
|
|
33
|
-
"data": {
|
|
34
|
-
"length": "the minimum required number of characters"
|
|
35
|
-
},
|
|
36
|
-
"description": "Password must be at least the required number of characters",
|
|
37
|
-
"statusCode": 400
|
|
38
|
-
},
|
|
39
|
-
"INVALID_PASSWORD_UPPERCASE": {
|
|
40
|
-
"description": "Password must contain at least one uppercase character",
|
|
41
|
-
"statusCode": 400
|
|
42
|
-
},
|
|
43
|
-
"INVALID_PASSWORD_LOWERCASE": {
|
|
44
|
-
"description": "Password must contain at least one lowercase character",
|
|
45
|
-
"statusCode": 400
|
|
46
|
-
},
|
|
47
|
-
"INVALID_PASSWORD_NUMBER": {
|
|
48
|
-
"description": "Password must contain at least one number",
|
|
49
|
-
"statusCode": 400
|
|
50
|
-
},
|
|
51
|
-
"INVALID_PASSWORD_SPECIAL": {
|
|
52
|
-
"description": "Password must contain at least one special character (#?!@$%^&*-)",
|
|
53
|
-
"statusCode": 400
|
|
54
|
-
},
|
|
55
|
-
"SUPER_USER_EXISTS": {
|
|
56
|
-
"description": "A Super Admin account already exists",
|
|
57
|
-
"statusCode": 400
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"ACCOUNT_LOCKED_PERM": {
|
|
3
|
+
"description": "User account has been permanently locked",
|
|
4
|
+
"statusCode": 401
|
|
5
|
+
},
|
|
6
|
+
"ACCOUNT_LOCKED_TEMP": {
|
|
7
|
+
"data": {
|
|
8
|
+
"remaining": "The amount of time remaining before account is unlocked"
|
|
9
|
+
},
|
|
10
|
+
"description": "User account has been temporarily locked",
|
|
11
|
+
"statusCode": 401
|
|
12
|
+
},
|
|
13
|
+
"ACCOUNT_NOT_LOCALAUTHD": {
|
|
14
|
+
"description": "Specified account is not authenticated with local auth",
|
|
15
|
+
"statusCode": 400
|
|
16
|
+
},
|
|
17
|
+
"BLACKLISTED_PASSWORD_VALUE": {
|
|
18
|
+
"description": "Password contains a blacklisted value",
|
|
19
|
+
"statusCode": 400
|
|
20
|
+
},
|
|
21
|
+
"INCORRECT_PASSWORD": {
|
|
22
|
+
"description": "Provided password does not match that stored",
|
|
23
|
+
"statusCode": 401
|
|
24
|
+
},
|
|
25
|
+
"INVALID_PASSWORD": {
|
|
26
|
+
"data": {
|
|
27
|
+
"errors": "The validation errors"
|
|
28
|
+
},
|
|
29
|
+
"description": "Password failed validation",
|
|
30
|
+
"statusCode": 400
|
|
31
|
+
},
|
|
32
|
+
"INVALID_PASSWORD_LENGTH": {
|
|
33
|
+
"data": {
|
|
34
|
+
"length": "the minimum required number of characters"
|
|
35
|
+
},
|
|
36
|
+
"description": "Password must be at least the required number of characters",
|
|
37
|
+
"statusCode": 400
|
|
38
|
+
},
|
|
39
|
+
"INVALID_PASSWORD_UPPERCASE": {
|
|
40
|
+
"description": "Password must contain at least one uppercase character",
|
|
41
|
+
"statusCode": 400
|
|
42
|
+
},
|
|
43
|
+
"INVALID_PASSWORD_LOWERCASE": {
|
|
44
|
+
"description": "Password must contain at least one lowercase character",
|
|
45
|
+
"statusCode": 400
|
|
46
|
+
},
|
|
47
|
+
"INVALID_PASSWORD_NUMBER": {
|
|
48
|
+
"description": "Password must contain at least one number",
|
|
49
|
+
"statusCode": 400
|
|
50
|
+
},
|
|
51
|
+
"INVALID_PASSWORD_SPECIAL": {
|
|
52
|
+
"description": "Password must contain at least one special character (#?!@$%^&*-)",
|
|
53
|
+
"statusCode": 400
|
|
54
|
+
},
|
|
55
|
+
"SUPER_USER_EXISTS": {
|
|
56
|
+
"description": "A Super Admin account already exists",
|
|
57
|
+
"statusCode": 400
|
|
58
|
+
}
|
|
59
59
|
}
|