@3sixty/api-auth-entity-storage-models 0.0.0-stage → 0.20.0-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.
Files changed (86) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -2
  3. package/dist/es/index.js +22 -0
  4. package/dist/es/index.js.map +1 -0
  5. package/dist/es/models/IAuthenticationAdminComponent.js +2 -0
  6. package/dist/es/models/IAuthenticationAdminComponent.js.map +1 -0
  7. package/dist/es/models/IAuthenticationComponent.js +2 -0
  8. package/dist/es/models/IAuthenticationComponent.js.map +1 -0
  9. package/dist/es/models/IAuthenticationUser.js +4 -0
  10. package/dist/es/models/IAuthenticationUser.js.map +1 -0
  11. package/dist/es/models/IAuthenticationUserSecure.js +2 -0
  12. package/dist/es/models/IAuthenticationUserSecure.js.map +1 -0
  13. package/dist/es/models/IPasswordOptions.js +4 -0
  14. package/dist/es/models/IPasswordOptions.js.map +1 -0
  15. package/dist/es/models/api/IAdminUserCreateRequest.js +2 -0
  16. package/dist/es/models/api/IAdminUserCreateRequest.js.map +1 -0
  17. package/dist/es/models/api/IAdminUserGetByIdentityRequest.js +4 -0
  18. package/dist/es/models/api/IAdminUserGetByIdentityRequest.js.map +1 -0
  19. package/dist/es/models/api/IAdminUserGetRequest.js +4 -0
  20. package/dist/es/models/api/IAdminUserGetRequest.js.map +1 -0
  21. package/dist/es/models/api/IAdminUserGetResponse.js +2 -0
  22. package/dist/es/models/api/IAdminUserGetResponse.js.map +1 -0
  23. package/dist/es/models/api/IAdminUserRemoveRequest.js +4 -0
  24. package/dist/es/models/api/IAdminUserRemoveRequest.js.map +1 -0
  25. package/dist/es/models/api/IAdminUserUpdatePasswordRequest.js +4 -0
  26. package/dist/es/models/api/IAdminUserUpdatePasswordRequest.js.map +1 -0
  27. package/dist/es/models/api/IAdminUserUpdateRequest.js +2 -0
  28. package/dist/es/models/api/IAdminUserUpdateRequest.js.map +1 -0
  29. package/dist/es/models/api/ILoginRequest.js +4 -0
  30. package/dist/es/models/api/ILoginRequest.js.map +1 -0
  31. package/dist/es/models/api/ILoginResponse.js +2 -0
  32. package/dist/es/models/api/ILoginResponse.js.map +1 -0
  33. package/dist/es/models/api/ILogoutRequest.js +4 -0
  34. package/dist/es/models/api/ILogoutRequest.js.map +1 -0
  35. package/dist/es/models/api/IPasswordPolicyResponse.js +2 -0
  36. package/dist/es/models/api/IPasswordPolicyResponse.js.map +1 -0
  37. package/dist/es/models/api/IRefreshTokenRequest.js +4 -0
  38. package/dist/es/models/api/IRefreshTokenRequest.js.map +1 -0
  39. package/dist/es/models/api/IRefreshTokenResponse.js +2 -0
  40. package/dist/es/models/api/IRefreshTokenResponse.js.map +1 -0
  41. package/dist/es/models/api/IUpdatePasswordRequest.js +4 -0
  42. package/dist/es/models/api/IUpdatePasswordRequest.js.map +1 -0
  43. package/dist/types/index.d.ts +19 -0
  44. package/dist/types/models/IAuthenticationAdminComponent.d.ts +47 -0
  45. package/dist/types/models/IAuthenticationComponent.d.ts +44 -0
  46. package/dist/types/models/IAuthenticationUser.d.ts +17 -0
  47. package/dist/types/models/IAuthenticationUserSecure.d.ts +18 -0
  48. package/dist/types/models/IPasswordOptions.d.ts +13 -0
  49. package/dist/types/models/api/IAdminUserCreateRequest.d.ts +12 -0
  50. package/dist/types/models/api/IAdminUserGetByIdentityRequest.d.ts +14 -0
  51. package/dist/types/models/api/IAdminUserGetRequest.d.ts +14 -0
  52. package/dist/types/models/api/IAdminUserGetResponse.d.ts +10 -0
  53. package/dist/types/models/api/IAdminUserRemoveRequest.d.ts +14 -0
  54. package/dist/types/models/api/IAdminUserUpdatePasswordRequest.d.ts +27 -0
  55. package/dist/types/models/api/IAdminUserUpdateRequest.d.ts +19 -0
  56. package/dist/types/models/api/ILoginRequest.d.ts +18 -0
  57. package/dist/types/models/api/ILoginResponse.d.ts +24 -0
  58. package/dist/types/models/api/ILogoutRequest.d.ts +14 -0
  59. package/dist/types/models/api/IPasswordPolicyResponse.d.ts +10 -0
  60. package/dist/types/models/api/IRefreshTokenRequest.d.ts +14 -0
  61. package/dist/types/models/api/IRefreshTokenResponse.d.ts +24 -0
  62. package/dist/types/models/api/IUpdatePasswordRequest.d.ts +18 -0
  63. package/docs/changelog.md +11 -0
  64. package/docs/examples.md +89 -0
  65. package/docs/reference/index.md +23 -0
  66. package/docs/reference/interfaces/IAdminUserCreateRequest.md +17 -0
  67. package/docs/reference/interfaces/IAdminUserGetByIdentityRequest.md +17 -0
  68. package/docs/reference/interfaces/IAdminUserGetRequest.md +17 -0
  69. package/docs/reference/interfaces/IAdminUserGetResponse.md +11 -0
  70. package/docs/reference/interfaces/IAdminUserRemoveRequest.md +17 -0
  71. package/docs/reference/interfaces/IAdminUserUpdatePasswordRequest.md +37 -0
  72. package/docs/reference/interfaces/IAdminUserUpdateRequest.md +25 -0
  73. package/docs/reference/interfaces/IAuthenticationAdminComponent.md +151 -0
  74. package/docs/reference/interfaces/IAuthenticationComponent.md +121 -0
  75. package/docs/reference/interfaces/IAuthenticationUser.md +31 -0
  76. package/docs/reference/interfaces/IAuthenticationUserSecure.md +67 -0
  77. package/docs/reference/interfaces/ILoginRequest.md +23 -0
  78. package/docs/reference/interfaces/ILoginResponse.md +31 -0
  79. package/docs/reference/interfaces/ILogoutRequest.md +17 -0
  80. package/docs/reference/interfaces/IPasswordOptions.md +19 -0
  81. package/docs/reference/interfaces/IPasswordPolicyResponse.md +11 -0
  82. package/docs/reference/interfaces/IRefreshTokenRequest.md +17 -0
  83. package/docs/reference/interfaces/IRefreshTokenResponse.md +31 -0
  84. package/docs/reference/interfaces/IUpdatePasswordRequest.md +23 -0
  85. package/locales/en.json +1 -0
  86. package/package.json +54 -5
@@ -0,0 +1,12 @@
1
+ import type { IAuthenticationUser } from "../IAuthenticationUser.js";
2
+ /**
3
+ * Create a new user as an admin.
4
+ */
5
+ export interface IAdminUserCreateRequest {
6
+ /**
7
+ * The body of the request.
8
+ */
9
+ body: IAuthenticationUser & {
10
+ password: string;
11
+ };
12
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Get a user as an admin.
3
+ */
4
+ export interface IAdminUserGetByIdentityRequest {
5
+ /**
6
+ * The path parameters for the request.
7
+ */
8
+ pathParams: {
9
+ /**
10
+ * The user identity.
11
+ */
12
+ identity: string;
13
+ };
14
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Get a user as an admin.
3
+ */
4
+ export interface IAdminUserGetRequest {
5
+ /**
6
+ * The path parameters for the request.
7
+ */
8
+ pathParams: {
9
+ /**
10
+ * The user email.
11
+ */
12
+ email: string;
13
+ };
14
+ }
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticationUser } from "../IAuthenticationUser.js";
2
+ /**
3
+ * Get a user as an admin.
4
+ */
5
+ export interface IAdminUserGetResponse {
6
+ /**
7
+ * The body of the request.
8
+ */
9
+ body: IAuthenticationUser;
10
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Remove a user as an admin.
3
+ */
4
+ export interface IAdminUserRemoveRequest {
5
+ /**
6
+ * The path parameters for the request.
7
+ */
8
+ pathParams: {
9
+ /**
10
+ * The user email.
11
+ */
12
+ email: string;
13
+ };
14
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Update a users password as an admin.
3
+ */
4
+ export interface IAdminUserUpdatePasswordRequest {
5
+ /**
6
+ * The path parameters for the request.
7
+ */
8
+ pathParams: {
9
+ /**
10
+ * The user email.
11
+ */
12
+ email: string;
13
+ };
14
+ /**
15
+ * The body of the request.
16
+ */
17
+ body: {
18
+ /**
19
+ * The new password for the user.
20
+ */
21
+ newPassword: string;
22
+ /**
23
+ * The current password for the user.
24
+ */
25
+ currentPassword?: string;
26
+ };
27
+ }
@@ -0,0 +1,19 @@
1
+ import type { IAuthenticationUser } from "../IAuthenticationUser.js";
2
+ /**
3
+ * Update a user as an admin.
4
+ */
5
+ export interface IAdminUserUpdateRequest {
6
+ /**
7
+ * The path parameters for the request.
8
+ */
9
+ pathParams: {
10
+ /**
11
+ * The user email.
12
+ */
13
+ email: string;
14
+ };
15
+ /**
16
+ * The body of the request.
17
+ */
18
+ body: Partial<Omit<IAuthenticationUser, "email">>;
19
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Perform a login on the server.
3
+ */
4
+ export interface ILoginRequest {
5
+ /**
6
+ * The login details.
7
+ */
8
+ body: {
9
+ /**
10
+ * The email address for the user.
11
+ */
12
+ email: string;
13
+ /**
14
+ * The password for the user.
15
+ */
16
+ password: string;
17
+ };
18
+ }
@@ -0,0 +1,24 @@
1
+ import type { HeaderTypes } from "@3sixty/web";
2
+ /**
3
+ * Response from a login on the server.
4
+ */
5
+ export interface ILoginResponse {
6
+ /**
7
+ * Response headers.
8
+ */
9
+ headers?: {
10
+ /**
11
+ * The cookie containing the auth token.
12
+ */
13
+ [HeaderTypes.SetCookie]?: string;
14
+ };
15
+ /**
16
+ * The login response details.
17
+ */
18
+ body: {
19
+ /**
20
+ * The expiry time of the token.
21
+ */
22
+ expiry: number;
23
+ };
24
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Perform a logout on the auth token.
3
+ */
4
+ export interface ILogoutRequest {
5
+ /**
6
+ * The logout token details.
7
+ */
8
+ body?: {
9
+ /**
10
+ * The token to logout, if it uses a mechanism with public access.
11
+ */
12
+ token?: string;
13
+ };
14
+ }
@@ -0,0 +1,10 @@
1
+ import type { IPasswordOptions } from "../IPasswordOptions.js";
2
+ /**
3
+ * Get the password policy.
4
+ */
5
+ export interface IPasswordPolicyResponse {
6
+ /**
7
+ * The body of the response.
8
+ */
9
+ body: IPasswordOptions;
10
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Perform a refresh of the auth token.
3
+ */
4
+ export interface IRefreshTokenRequest {
5
+ /**
6
+ * The refresh token details.
7
+ */
8
+ body?: {
9
+ /**
10
+ * The token to refresh, if it uses a mechanism with public access.
11
+ */
12
+ token?: string;
13
+ };
14
+ }
@@ -0,0 +1,24 @@
1
+ import type { HeaderTypes } from "@3sixty/web";
2
+ /**
3
+ * Response from a refresh on the auth token.
4
+ */
5
+ export interface IRefreshTokenResponse {
6
+ /**
7
+ * Response headers.
8
+ */
9
+ headers?: {
10
+ /**
11
+ * The cookie containing the auth token.
12
+ */
13
+ [HeaderTypes.SetCookie]?: string;
14
+ };
15
+ /**
16
+ * The refresh token details.
17
+ */
18
+ body: {
19
+ /**
20
+ * The expiry time of the token.
21
+ */
22
+ expiry: number;
23
+ };
24
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Update the current user's password.
3
+ */
4
+ export interface IUpdatePasswordRequest {
5
+ /**
6
+ * The body of the request.
7
+ */
8
+ body: {
9
+ /**
10
+ * The current password for the user.
11
+ */
12
+ currentPassword: string;
13
+ /**
14
+ * The new password for the user.
15
+ */
16
+ newPassword: string;
17
+ };
18
+ }
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## [0.20.0-next.1](https://github.com/3sixtyglobal/api-auth/compare/api-auth-entity-storage-models-v0.20.0-next.0...api-auth-entity-storage-models-v0.20.0-next.1) (2026-10-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * authorization ([#3](https://github.com/3sixtyglobal/api-auth/issues/3)) ([5688693](https://github.com/3sixtyglobal/api-auth/commit/568869364065b9d2c82c5c17c81f07cbdc64ec8b))
9
+ * initial commit ([b9112fb](https://github.com/3sixtyglobal/api-auth/commit/b9112fb6994758b43effdde1b9e41435ff50fe50))
10
+ * publish packages under the [@3sixty](https://github.com/3sixty) namespace ([6c22482](https://github.com/3sixtyglobal/api-auth/commit/6c2248295620000807ff91087c3b1dfc9b018b31))
11
+ * updated ts compile ([83c72bd](https://github.com/3sixtyglobal/api-auth/commit/83c72bd5d2e9d81208b7a2755450d96fbbb04004))
@@ -0,0 +1,89 @@
1
+ # Auth Entity Storage Models Examples
2
+
3
+ Use these snippets to shape request and response data consistently across sign-in flows, admin operations, and token refresh handling.
4
+
5
+ ## Authentication Requests
6
+
7
+ ```typescript
8
+ import type {
9
+ ILoginRequest,
10
+ IRefreshTokenRequest,
11
+ IUpdatePasswordRequest
12
+ } from '@3sixty/api-auth-entity-storage-models';
13
+
14
+ const loginRequest: ILoginRequest = {
15
+ body: {
16
+ email: 'alice@example.org',
17
+ password: 'correct-horse-battery-staple'
18
+ }
19
+ };
20
+
21
+ const refreshRequest: IRefreshTokenRequest = {
22
+ body: {
23
+ token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.refresh'
24
+ }
25
+ };
26
+
27
+ const updatePasswordRequest: IUpdatePasswordRequest = {
28
+ body: {
29
+ currentPassword: 'old-password',
30
+ newPassword: 'new-password-2026'
31
+ }
32
+ };
33
+
34
+ console.log(loginRequest.body.email); // alice@example.org
35
+ ```
36
+
37
+ ## Admin User Models
38
+
39
+ ```typescript
40
+ import type {
41
+ IAdminUserCreateRequest,
42
+ IAdminUserUpdateRequest
43
+ } from '@3sixty/api-auth-entity-storage-models';
44
+
45
+ const createRequest: IAdminUserCreateRequest = {
46
+ body: {
47
+ email: 'bob@example.org',
48
+ password: 'initial-password',
49
+ userIdentity: 'did:example:bob',
50
+ organizationIdentity: 'did:example:org'
51
+ }
52
+ };
53
+
54
+ const updateRequest: IAdminUserUpdateRequest = {
55
+ pathParams: {
56
+ email: 'bob@example.org'
57
+ },
58
+ body: {
59
+ userIdentity: 'did:example:bob:ops'
60
+ }
61
+ };
62
+
63
+ console.log(updateRequest.body.userIdentity); // did:example:bob:ops
64
+ ```
65
+
66
+ ## Authentication Responses
67
+
68
+ ```typescript
69
+ import type {
70
+ ILoginResponse,
71
+ IPasswordPolicyResponse
72
+ } from '@3sixty/api-auth-entity-storage-models';
73
+
74
+ const loginResponse: ILoginResponse = {
75
+ body: {
76
+ expiry: 3600
77
+ }
78
+ };
79
+
80
+ const passwordPolicyResponse: IPasswordPolicyResponse = {
81
+ body: {
82
+ minPasswordLength: 8,
83
+ maxPasswordLength: 128
84
+ }
85
+ };
86
+
87
+ console.log(loginResponse.body.expiry); // 3600
88
+ console.log(passwordPolicyResponse.body.minPasswordLength); // 8
89
+ ```
@@ -0,0 +1,23 @@
1
+ # @3sixty/api-auth-entity-storage-models
2
+
3
+ ## Interfaces
4
+
5
+ - [IAuthenticationAdminComponent](interfaces/IAuthenticationAdminComponent.md)
6
+ - [IAuthenticationComponent](interfaces/IAuthenticationComponent.md)
7
+ - [IAuthenticationUser](interfaces/IAuthenticationUser.md)
8
+ - [IAuthenticationUserSecure](interfaces/IAuthenticationUserSecure.md)
9
+ - [IPasswordOptions](interfaces/IPasswordOptions.md)
10
+ - [IAdminUserCreateRequest](interfaces/IAdminUserCreateRequest.md)
11
+ - [IAdminUserGetByIdentityRequest](interfaces/IAdminUserGetByIdentityRequest.md)
12
+ - [IAdminUserGetRequest](interfaces/IAdminUserGetRequest.md)
13
+ - [IAdminUserGetResponse](interfaces/IAdminUserGetResponse.md)
14
+ - [IAdminUserRemoveRequest](interfaces/IAdminUserRemoveRequest.md)
15
+ - [IAdminUserUpdatePasswordRequest](interfaces/IAdminUserUpdatePasswordRequest.md)
16
+ - [IAdminUserUpdateRequest](interfaces/IAdminUserUpdateRequest.md)
17
+ - [ILoginRequest](interfaces/ILoginRequest.md)
18
+ - [ILoginResponse](interfaces/ILoginResponse.md)
19
+ - [ILogoutRequest](interfaces/ILogoutRequest.md)
20
+ - [IPasswordPolicyResponse](interfaces/IPasswordPolicyResponse.md)
21
+ - [IRefreshTokenRequest](interfaces/IRefreshTokenRequest.md)
22
+ - [IRefreshTokenResponse](interfaces/IRefreshTokenResponse.md)
23
+ - [IUpdatePasswordRequest](interfaces/IUpdatePasswordRequest.md)
@@ -0,0 +1,17 @@
1
+ # Interface: IAdminUserCreateRequest
2
+
3
+ Create a new user as an admin.
4
+
5
+ ## Properties
6
+
7
+ ### body {#body}
8
+
9
+ > **body**: [`IAuthenticationUser`](IAuthenticationUser.md) & `object`
10
+
11
+ The body of the request.
12
+
13
+ #### Type Declaration
14
+
15
+ ##### password
16
+
17
+ > **password**: `string`
@@ -0,0 +1,17 @@
1
+ # Interface: IAdminUserGetByIdentityRequest
2
+
3
+ Get a user as an admin.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams {#pathparams}
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters for the request.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The user identity.
@@ -0,0 +1,17 @@
1
+ # Interface: IAdminUserGetRequest
2
+
3
+ Get a user as an admin.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams {#pathparams}
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters for the request.
12
+
13
+ #### email
14
+
15
+ > **email**: `string`
16
+
17
+ The user email.
@@ -0,0 +1,11 @@
1
+ # Interface: IAdminUserGetResponse
2
+
3
+ Get a user as an admin.
4
+
5
+ ## Properties
6
+
7
+ ### body {#body}
8
+
9
+ > **body**: [`IAuthenticationUser`](IAuthenticationUser.md)
10
+
11
+ The body of the request.
@@ -0,0 +1,17 @@
1
+ # Interface: IAdminUserRemoveRequest
2
+
3
+ Remove a user as an admin.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams {#pathparams}
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters for the request.
12
+
13
+ #### email
14
+
15
+ > **email**: `string`
16
+
17
+ The user email.
@@ -0,0 +1,37 @@
1
+ # Interface: IAdminUserUpdatePasswordRequest
2
+
3
+ Update a users password as an admin.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams {#pathparams}
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters for the request.
12
+
13
+ #### email
14
+
15
+ > **email**: `string`
16
+
17
+ The user email.
18
+
19
+ ***
20
+
21
+ ### body {#body}
22
+
23
+ > **body**: `object`
24
+
25
+ The body of the request.
26
+
27
+ #### newPassword
28
+
29
+ > **newPassword**: `string`
30
+
31
+ The new password for the user.
32
+
33
+ #### currentPassword?
34
+
35
+ > `optional` **currentPassword?**: `string`
36
+
37
+ The current password for the user.
@@ -0,0 +1,25 @@
1
+ # Interface: IAdminUserUpdateRequest
2
+
3
+ Update a user as an admin.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams {#pathparams}
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters for the request.
12
+
13
+ #### email
14
+
15
+ > **email**: `string`
16
+
17
+ The user email.
18
+
19
+ ***
20
+
21
+ ### body {#body}
22
+
23
+ > **body**: `Partial`\<`Omit`\<[`IAuthenticationUser`](IAuthenticationUser.md), `"email"`\>\>
24
+
25
+ The body of the request.
@@ -0,0 +1,151 @@
1
+ # Interface: IAuthenticationAdminComponent
2
+
3
+ Contract definition for authentication admin component.
4
+
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
9
+ ## Methods
10
+
11
+ ### create() {#create}
12
+
13
+ > **create**(`user`): `Promise`\<`void`\>
14
+
15
+ Create a login for the user.
16
+
17
+ #### Parameters
18
+
19
+ ##### user
20
+
21
+ [`IAuthenticationUser`](IAuthenticationUser.md) & `object`
22
+
23
+ The user to create.
24
+
25
+ #### Returns
26
+
27
+ `Promise`\<`void`\>
28
+
29
+ A promise that resolves when the user account has been created.
30
+
31
+ ***
32
+
33
+ ### update() {#update}
34
+
35
+ > **update**(`user`): `Promise`\<`void`\>
36
+
37
+ Update a login for the user.
38
+
39
+ #### Parameters
40
+
41
+ ##### user
42
+
43
+ `Partial`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
44
+
45
+ The user to update.
46
+
47
+ #### Returns
48
+
49
+ `Promise`\<`void`\>
50
+
51
+ A promise that resolves when the user account has been updated.
52
+
53
+ ***
54
+
55
+ ### get() {#get}
56
+
57
+ > **get**(`email`): `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
58
+
59
+ Get a user by email.
60
+
61
+ #### Parameters
62
+
63
+ ##### email
64
+
65
+ `string`
66
+
67
+ The email address of the user to get.
68
+
69
+ #### Returns
70
+
71
+ `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
72
+
73
+ The user details.
74
+
75
+ ***
76
+
77
+ ### getByIdentity() {#getbyidentity}
78
+
79
+ > **getByIdentity**(`identity`): `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
80
+
81
+ Get a user by identity.
82
+
83
+ #### Parameters
84
+
85
+ ##### identity
86
+
87
+ `string`
88
+
89
+ The identity of the user to get.
90
+
91
+ #### Returns
92
+
93
+ `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
94
+
95
+ The user details.
96
+
97
+ ***
98
+
99
+ ### remove() {#remove}
100
+
101
+ > **remove**(`email`): `Promise`\<`void`\>
102
+
103
+ Remove a user.
104
+
105
+ #### Parameters
106
+
107
+ ##### email
108
+
109
+ `string`
110
+
111
+ The email address of the user to remove.
112
+
113
+ #### Returns
114
+
115
+ `Promise`\<`void`\>
116
+
117
+ A promise that resolves when the user account has been removed.
118
+
119
+ ***
120
+
121
+ ### updatePassword() {#updatepassword}
122
+
123
+ > **updatePassword**(`email`, `newPassword`, `currentPassword?`): `Promise`\<`void`\>
124
+
125
+ Update the user's password.
126
+
127
+ #### Parameters
128
+
129
+ ##### email
130
+
131
+ `string`
132
+
133
+ The email address of the user to update.
134
+
135
+ ##### newPassword
136
+
137
+ `string`
138
+
139
+ The new password for the user.
140
+
141
+ ##### currentPassword?
142
+
143
+ `string`
144
+
145
+ The current password, optional, if supplied will check against existing.
146
+
147
+ #### Returns
148
+
149
+ `Promise`\<`void`\>
150
+
151
+ A promise that resolves when the password has been updated.