@twin.org/api-auth-entity-storage-rest-client 0.0.1 → 0.0.2-next.1
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/dist/cjs/index.cjs
CHANGED
|
@@ -60,6 +60,27 @@ class EntityStorageAuthenticationClient extends apiCore.BaseRestClient {
|
|
|
60
60
|
});
|
|
61
61
|
return response.body;
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Update the user's password.
|
|
65
|
+
* @param email The email address of the user to update.
|
|
66
|
+
* @param currentPassword The current password for the user.
|
|
67
|
+
* @param newPassword The new password for the user.
|
|
68
|
+
* @returns Nothing.
|
|
69
|
+
*/
|
|
70
|
+
async updatePassword(email, currentPassword, newPassword) {
|
|
71
|
+
core.Guards.stringValue(this.CLASS_NAME, "email", email);
|
|
72
|
+
core.Guards.stringValue(this.CLASS_NAME, "currentPassword", currentPassword);
|
|
73
|
+
core.Guards.stringValue(this.CLASS_NAME, "newPassword", newPassword);
|
|
74
|
+
await this.fetch("/:email/password", "PUT", {
|
|
75
|
+
pathParams: {
|
|
76
|
+
email
|
|
77
|
+
},
|
|
78
|
+
body: {
|
|
79
|
+
currentPassword,
|
|
80
|
+
newPassword
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
63
84
|
}
|
|
64
85
|
|
|
65
86
|
exports.EntityStorageAuthenticationClient = EntityStorageAuthenticationClient;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -58,6 +58,27 @@ class EntityStorageAuthenticationClient extends BaseRestClient {
|
|
|
58
58
|
});
|
|
59
59
|
return response.body;
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Update the user's password.
|
|
63
|
+
* @param email The email address of the user to update.
|
|
64
|
+
* @param currentPassword The current password for the user.
|
|
65
|
+
* @param newPassword The new password for the user.
|
|
66
|
+
* @returns Nothing.
|
|
67
|
+
*/
|
|
68
|
+
async updatePassword(email, currentPassword, newPassword) {
|
|
69
|
+
Guards.stringValue(this.CLASS_NAME, "email", email);
|
|
70
|
+
Guards.stringValue(this.CLASS_NAME, "currentPassword", currentPassword);
|
|
71
|
+
Guards.stringValue(this.CLASS_NAME, "newPassword", newPassword);
|
|
72
|
+
await this.fetch("/:email/password", "PUT", {
|
|
73
|
+
pathParams: {
|
|
74
|
+
email
|
|
75
|
+
},
|
|
76
|
+
body: {
|
|
77
|
+
currentPassword,
|
|
78
|
+
newPassword
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
61
82
|
}
|
|
62
83
|
|
|
63
84
|
export { EntityStorageAuthenticationClient };
|
|
@@ -39,4 +39,12 @@ export declare class EntityStorageAuthenticationClient extends BaseRestClient im
|
|
|
39
39
|
token?: string;
|
|
40
40
|
expiry: number;
|
|
41
41
|
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Update the user's password.
|
|
44
|
+
* @param email The email address of the user to update.
|
|
45
|
+
* @param currentPassword The current password for the user.
|
|
46
|
+
* @param newPassword The new password for the user.
|
|
47
|
+
* @returns Nothing.
|
|
48
|
+
*/
|
|
49
|
+
updatePassword(email: string, currentPassword: string, newPassword: string): Promise<void>;
|
|
42
50
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @twin.org/api-auth-entity-storage-rest-client - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-rest-client-v0.0.2-next.0...api-auth-entity-storage-rest-client-v0.0.2-next.1) (2025-07-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add json-ld mime type processor and auth admin component ([8861791](https://github.com/twinfoundation/api/commit/88617916e23bfbca023dbae1976fe421983a02ff))
|
|
9
|
+
* update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
|
|
10
|
+
* use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Dependencies
|
|
14
|
+
|
|
15
|
+
* The following workspace dependencies were updated
|
|
16
|
+
* dependencies
|
|
17
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
18
|
+
* @twin.org/api-core bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
19
|
+
* @twin.org/api-models bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
20
|
+
|
|
3
21
|
## 0.0.1 (2025-07-03)
|
|
4
22
|
|
|
5
23
|
|
|
@@ -129,3 +129,41 @@ The refreshed token, if it uses a mechanism with public access.
|
|
|
129
129
|
#### Implementation of
|
|
130
130
|
|
|
131
131
|
`IAuthenticationComponent.refresh`
|
|
132
|
+
|
|
133
|
+
***
|
|
134
|
+
|
|
135
|
+
### updatePassword()
|
|
136
|
+
|
|
137
|
+
> **updatePassword**(`email`, `currentPassword`, `newPassword`): `Promise`\<`void`\>
|
|
138
|
+
|
|
139
|
+
Update the user's password.
|
|
140
|
+
|
|
141
|
+
#### Parameters
|
|
142
|
+
|
|
143
|
+
##### email
|
|
144
|
+
|
|
145
|
+
`string`
|
|
146
|
+
|
|
147
|
+
The email address of the user to update.
|
|
148
|
+
|
|
149
|
+
##### currentPassword
|
|
150
|
+
|
|
151
|
+
`string`
|
|
152
|
+
|
|
153
|
+
The current password for the user.
|
|
154
|
+
|
|
155
|
+
##### newPassword
|
|
156
|
+
|
|
157
|
+
`string`
|
|
158
|
+
|
|
159
|
+
The new password for the user.
|
|
160
|
+
|
|
161
|
+
#### Returns
|
|
162
|
+
|
|
163
|
+
`Promise`\<`void`\>
|
|
164
|
+
|
|
165
|
+
Nothing.
|
|
166
|
+
|
|
167
|
+
#### Implementation of
|
|
168
|
+
|
|
169
|
+
`IAuthenticationComponent.updatePassword`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/api-auth-entity-storage-rest-client",
|
|
3
|
-
"version": "0.0.1",
|
|
3
|
+
"version": "0.0.2-next.1",
|
|
4
4
|
"description": "Perform REST authentication using entity storage.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/api-auth-entity-storage-models": "
|
|
18
|
-
"@twin.org/api-core": "
|
|
19
|
-
"@twin.org/api-models": "
|
|
20
|
-
"@twin.org/core": "
|
|
21
|
-
"@twin.org/nameof": "
|
|
22
|
-
"@twin.org/web": "
|
|
17
|
+
"@twin.org/api-auth-entity-storage-models": "0.0.2-next.1",
|
|
18
|
+
"@twin.org/api-core": "0.0.2-next.1",
|
|
19
|
+
"@twin.org/api-models": "0.0.2-next.1",
|
|
20
|
+
"@twin.org/core": "next",
|
|
21
|
+
"@twin.org/nameof": "next",
|
|
22
|
+
"@twin.org/web": "next"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/cjs/index.cjs",
|
|
25
25
|
"module": "./dist/esm/index.mjs",
|