@authsome/client 0.0.3 → 0.0.4
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/client.d.ts +86 -37
- package/dist/client.js +65 -17
- package/dist/index.d.ts +21 -17
- package/dist/index.js +65 -53
- package/dist/plugins/admin.d.ts +18 -6
- package/dist/plugins/admin.js +12 -12
- package/dist/plugins/apikey.d.ts +13 -5
- package/dist/plugins/apikey.js +12 -14
- package/dist/plugins/backupauth.d.ts +15 -5
- package/dist/plugins/backupauth.js +10 -10
- package/dist/plugins/cms.d.ts +54 -0
- package/dist/plugins/cms.js +139 -0
- package/dist/plugins/compliance.d.ts +90 -30
- package/dist/plugins/compliance.js +60 -60
- package/dist/plugins/consent.d.ts +24 -8
- package/dist/plugins/consent.js +16 -16
- package/dist/plugins/emailverification.d.ts +12 -0
- package/dist/plugins/emailverification.js +33 -0
- package/dist/plugins/idverification.d.ts +21 -7
- package/dist/plugins/idverification.js +14 -14
- package/dist/plugins/impersonation.d.ts +3 -1
- package/dist/plugins/impersonation.js +2 -2
- package/dist/plugins/mfa.d.ts +21 -7
- package/dist/plugins/mfa.js +14 -14
- package/dist/plugins/multiapp.d.ts +40 -13
- package/dist/plugins/multiapp.js +26 -26
- package/dist/plugins/multisession.d.ts +11 -1
- package/dist/plugins/multisession.js +28 -2
- package/dist/plugins/notification.d.ts +25 -9
- package/dist/plugins/notification.js +16 -16
- package/dist/plugins/oidcprovider.d.ts +9 -3
- package/dist/plugins/oidcprovider.js +6 -6
- package/dist/plugins/organization.d.ts +30 -10
- package/dist/plugins/organization.js +20 -20
- package/dist/plugins/passkey.d.ts +6 -2
- package/dist/plugins/passkey.js +4 -4
- package/dist/plugins/permissions.d.ts +12 -0
- package/dist/plugins/permissions.js +33 -0
- package/dist/plugins/secrets.d.ts +33 -0
- package/dist/plugins/secrets.js +63 -0
- package/dist/plugins/social.d.ts +11 -2
- package/dist/plugins/social.js +7 -5
- package/dist/plugins/sso.d.ts +12 -4
- package/dist/plugins/sso.js +8 -8
- package/dist/plugins/stepup.d.ts +15 -5
- package/dist/plugins/stepup.js +10 -10
- package/dist/types.d.ts +2878 -2453
- package/package.json +2 -1
- package/src/client.ts +96 -37
- package/src/index.ts +21 -17
- package/src/plugins/admin.ts +12 -12
- package/src/plugins/apikey.ts +13 -15
- package/src/plugins/backupauth.ts +10 -10
- package/src/plugins/cms.ts +170 -0
- package/src/plugins/compliance.ts +60 -60
- package/src/plugins/consent.ts +16 -16
- package/src/plugins/emailverification.ts +38 -0
- package/src/plugins/idverification.ts +14 -14
- package/src/plugins/impersonation.ts +2 -2
- package/src/plugins/mfa.ts +14 -14
- package/src/plugins/multiapp.ts +26 -26
- package/src/plugins/multisession.ts +34 -2
- package/src/plugins/notification.ts +18 -18
- package/src/plugins/oidcprovider.ts +6 -6
- package/src/plugins/organization.ts +20 -20
- package/src/plugins/passkey.ts +4 -4
- package/src/plugins/permissions.ts +38 -0
- package/src/plugins/secrets.ts +76 -0
- package/src/plugins/social.ts +7 -5
- package/src/plugins/sso.ts +8 -8
- package/src/plugins/stepup.ts +10 -10
- package/src/types.ts +2989 -2486
- package/authsome-client-0.0.2.tgz +0 -0
|
@@ -10,8 +10,8 @@ class NotificationPlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async previewTemplate(request) {
|
|
14
|
-
const path =
|
|
13
|
+
async previewTemplate(params, request) {
|
|
14
|
+
const path = `/${params.id}/preview`;
|
|
15
15
|
return this.client.request('POST', path, {
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
@@ -20,24 +20,24 @@ class NotificationPlugin {
|
|
|
20
20
|
const path = '/createtemplate';
|
|
21
21
|
return this.client.request('POST', path);
|
|
22
22
|
}
|
|
23
|
-
async getTemplate() {
|
|
24
|
-
const path =
|
|
23
|
+
async getTemplate(params) {
|
|
24
|
+
const path = `/${params.id}`;
|
|
25
25
|
return this.client.request('GET', path);
|
|
26
26
|
}
|
|
27
27
|
async listTemplates() {
|
|
28
28
|
const path = '/listtemplates';
|
|
29
29
|
return this.client.request('GET', path);
|
|
30
30
|
}
|
|
31
|
-
async updateTemplate() {
|
|
32
|
-
const path =
|
|
31
|
+
async updateTemplate(params) {
|
|
32
|
+
const path = `/${params.id}`;
|
|
33
33
|
return this.client.request('PUT', path);
|
|
34
34
|
}
|
|
35
|
-
async deleteTemplate() {
|
|
36
|
-
const path =
|
|
35
|
+
async deleteTemplate(params) {
|
|
36
|
+
const path = `/${params.id}`;
|
|
37
37
|
return this.client.request('DELETE', path);
|
|
38
38
|
}
|
|
39
|
-
async resetTemplate() {
|
|
40
|
-
const path =
|
|
39
|
+
async resetTemplate(params) {
|
|
40
|
+
const path = `/${params.id}/reset`;
|
|
41
41
|
return this.client.request('POST', path);
|
|
42
42
|
}
|
|
43
43
|
async resetAllTemplates() {
|
|
@@ -58,20 +58,20 @@ class NotificationPlugin {
|
|
|
58
58
|
const path = '/send';
|
|
59
59
|
return this.client.request('POST', path);
|
|
60
60
|
}
|
|
61
|
-
async getNotification() {
|
|
62
|
-
const path =
|
|
61
|
+
async getNotification(params) {
|
|
62
|
+
const path = `/${params.id}`;
|
|
63
63
|
return this.client.request('GET', path);
|
|
64
64
|
}
|
|
65
65
|
async listNotifications() {
|
|
66
66
|
const path = '/listnotifications';
|
|
67
67
|
return this.client.request('GET', path);
|
|
68
68
|
}
|
|
69
|
-
async resendNotification() {
|
|
70
|
-
const path =
|
|
69
|
+
async resendNotification(params) {
|
|
70
|
+
const path = `/${params.id}/resend`;
|
|
71
71
|
return this.client.request('POST', path);
|
|
72
72
|
}
|
|
73
|
-
async handleWebhook() {
|
|
74
|
-
const path =
|
|
73
|
+
async handleWebhook(params) {
|
|
74
|
+
const path = `/notifications/webhook/${params.provider}`;
|
|
75
75
|
return this.client.request('POST', path);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -7,9 +7,15 @@ export declare class OidcproviderPlugin implements ClientPlugin {
|
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
8
|
registerClient(request: types.ClientRegistrationRequest): Promise<void>;
|
|
9
9
|
listClients(): Promise<void>;
|
|
10
|
-
getClient(
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
getClient(params: {
|
|
11
|
+
clientId: string;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
updateClient(params: {
|
|
14
|
+
clientId: string;
|
|
15
|
+
}, request: types.ClientUpdateRequest): Promise<void>;
|
|
16
|
+
deleteClient(params: {
|
|
17
|
+
clientId: string;
|
|
18
|
+
}): Promise<void>;
|
|
13
19
|
discovery(): Promise<void>;
|
|
14
20
|
jWKS(): Promise<void>;
|
|
15
21
|
authorize(): Promise<void>;
|
|
@@ -20,18 +20,18 @@ class OidcproviderPlugin {
|
|
|
20
20
|
const path = '/listclients';
|
|
21
21
|
return this.client.request('GET', path);
|
|
22
22
|
}
|
|
23
|
-
async getClient() {
|
|
24
|
-
const path =
|
|
23
|
+
async getClient(params) {
|
|
24
|
+
const path = `/${params.clientId}`;
|
|
25
25
|
return this.client.request('GET', path);
|
|
26
26
|
}
|
|
27
|
-
async updateClient(request) {
|
|
28
|
-
const path =
|
|
27
|
+
async updateClient(params, request) {
|
|
28
|
+
const path = `/${params.clientId}`;
|
|
29
29
|
return this.client.request('PUT', path, {
|
|
30
30
|
body: request,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
async deleteClient() {
|
|
34
|
-
const path =
|
|
33
|
+
async deleteClient(params) {
|
|
34
|
+
const path = `/${params.clientId}`;
|
|
35
35
|
return this.client.request('DELETE', path);
|
|
36
36
|
}
|
|
37
37
|
async discovery() {
|
|
@@ -6,20 +6,40 @@ export declare class OrganizationPlugin implements ClientPlugin {
|
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
8
|
createOrganization(): Promise<void>;
|
|
9
|
-
updateOrganization(
|
|
10
|
-
|
|
9
|
+
updateOrganization(params: {
|
|
10
|
+
id: string;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
deleteOrganization(params: {
|
|
13
|
+
id: string;
|
|
14
|
+
}): Promise<void>;
|
|
11
15
|
inviteMember(): Promise<void>;
|
|
12
|
-
removeMember(
|
|
16
|
+
removeMember(params: {
|
|
17
|
+
memberId: string;
|
|
18
|
+
}): Promise<void>;
|
|
13
19
|
createTeam(): Promise<void>;
|
|
14
|
-
updateTeam(
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
updateTeam(params: {
|
|
21
|
+
teamId: string;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
deleteTeam(params: {
|
|
24
|
+
teamId: string;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
getOrganization(params: {
|
|
27
|
+
id: string;
|
|
28
|
+
}): Promise<void>;
|
|
17
29
|
listOrganizations(): Promise<void>;
|
|
18
|
-
getOrganizationBySlug(
|
|
30
|
+
getOrganizationBySlug(params: {
|
|
31
|
+
slug: string;
|
|
32
|
+
}): Promise<void>;
|
|
19
33
|
listMembers(): Promise<void>;
|
|
20
|
-
updateMember(
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
updateMember(params: {
|
|
35
|
+
memberId: string;
|
|
36
|
+
}): Promise<void>;
|
|
37
|
+
acceptInvitation(params: {
|
|
38
|
+
token: string;
|
|
39
|
+
}): Promise<void>;
|
|
40
|
+
declineInvitation(params: {
|
|
41
|
+
token: string;
|
|
42
|
+
}): Promise<types.StatusResponse>;
|
|
23
43
|
listTeams(): Promise<void>;
|
|
24
44
|
}
|
|
25
45
|
export declare function organizationClient(): OrganizationPlugin;
|
|
@@ -14,60 +14,60 @@ class OrganizationPlugin {
|
|
|
14
14
|
const path = '/createorganization';
|
|
15
15
|
return this.client.request('POST', path);
|
|
16
16
|
}
|
|
17
|
-
async updateOrganization() {
|
|
18
|
-
const path =
|
|
17
|
+
async updateOrganization(params) {
|
|
18
|
+
const path = `/${params.id}`;
|
|
19
19
|
return this.client.request('PATCH', path);
|
|
20
20
|
}
|
|
21
|
-
async deleteOrganization() {
|
|
22
|
-
const path =
|
|
21
|
+
async deleteOrganization(params) {
|
|
22
|
+
const path = `/${params.id}`;
|
|
23
23
|
return this.client.request('DELETE', path);
|
|
24
24
|
}
|
|
25
25
|
async inviteMember() {
|
|
26
26
|
const path = '/invite';
|
|
27
27
|
return this.client.request('POST', path);
|
|
28
28
|
}
|
|
29
|
-
async removeMember() {
|
|
30
|
-
const path =
|
|
29
|
+
async removeMember(params) {
|
|
30
|
+
const path = `/${params.memberId}`;
|
|
31
31
|
return this.client.request('DELETE', path);
|
|
32
32
|
}
|
|
33
33
|
async createTeam() {
|
|
34
34
|
const path = '/createteam';
|
|
35
35
|
return this.client.request('POST', path);
|
|
36
36
|
}
|
|
37
|
-
async updateTeam() {
|
|
38
|
-
const path =
|
|
37
|
+
async updateTeam(params) {
|
|
38
|
+
const path = `/${params.teamId}`;
|
|
39
39
|
return this.client.request('PATCH', path);
|
|
40
40
|
}
|
|
41
|
-
async deleteTeam() {
|
|
42
|
-
const path =
|
|
41
|
+
async deleteTeam(params) {
|
|
42
|
+
const path = `/${params.teamId}`;
|
|
43
43
|
return this.client.request('DELETE', path);
|
|
44
44
|
}
|
|
45
|
-
async getOrganization() {
|
|
46
|
-
const path =
|
|
45
|
+
async getOrganization(params) {
|
|
46
|
+
const path = `/${params.id}`;
|
|
47
47
|
return this.client.request('GET', path);
|
|
48
48
|
}
|
|
49
49
|
async listOrganizations() {
|
|
50
50
|
const path = '/listorganizations';
|
|
51
51
|
return this.client.request('GET', path);
|
|
52
52
|
}
|
|
53
|
-
async getOrganizationBySlug() {
|
|
54
|
-
const path =
|
|
53
|
+
async getOrganizationBySlug(params) {
|
|
54
|
+
const path = `/slug/${params.slug}`;
|
|
55
55
|
return this.client.request('GET', path);
|
|
56
56
|
}
|
|
57
57
|
async listMembers() {
|
|
58
58
|
const path = '/listmembers';
|
|
59
59
|
return this.client.request('GET', path);
|
|
60
60
|
}
|
|
61
|
-
async updateMember() {
|
|
62
|
-
const path =
|
|
61
|
+
async updateMember(params) {
|
|
62
|
+
const path = `/${params.memberId}`;
|
|
63
63
|
return this.client.request('PATCH', path);
|
|
64
64
|
}
|
|
65
|
-
async acceptInvitation() {
|
|
66
|
-
const path =
|
|
65
|
+
async acceptInvitation(params) {
|
|
66
|
+
const path = `/${params.token}/accept`;
|
|
67
67
|
return this.client.request('POST', path);
|
|
68
68
|
}
|
|
69
|
-
async declineInvitation() {
|
|
70
|
-
const path =
|
|
69
|
+
async declineInvitation(params) {
|
|
70
|
+
const path = `/${params.token}/decline`;
|
|
71
71
|
return this.client.request('POST', path);
|
|
72
72
|
}
|
|
73
73
|
async listTeams() {
|
|
@@ -10,7 +10,11 @@ export declare class PasskeyPlugin implements ClientPlugin {
|
|
|
10
10
|
beginLogin(): Promise<void>;
|
|
11
11
|
finishLogin(): Promise<void>;
|
|
12
12
|
list(): Promise<void>;
|
|
13
|
-
update(
|
|
14
|
-
|
|
13
|
+
update(params: {
|
|
14
|
+
id: string;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
delete(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}): Promise<types.StatusResponse>;
|
|
15
19
|
}
|
|
16
20
|
export declare function passkeyClient(): PasskeyPlugin;
|
package/dist/plugins/passkey.js
CHANGED
|
@@ -30,12 +30,12 @@ class PasskeyPlugin {
|
|
|
30
30
|
const path = '/list';
|
|
31
31
|
return this.client.request('GET', path);
|
|
32
32
|
}
|
|
33
|
-
async update() {
|
|
34
|
-
const path =
|
|
33
|
+
async update(params) {
|
|
34
|
+
const path = `/${params.id}`;
|
|
35
35
|
return this.client.request('PUT', path);
|
|
36
36
|
}
|
|
37
|
-
async delete() {
|
|
38
|
-
const path =
|
|
37
|
+
async delete(params) {
|
|
38
|
+
const path = `/${params.id}`;
|
|
39
39
|
return this.client.request('DELETE', path);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class PermissionsPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "permissions";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
migrateAll(request: types.MigrateAllRequest): Promise<types.ErrorResponse>;
|
|
9
|
+
migrateRoles(): Promise<types.ErrorResponse>;
|
|
10
|
+
previewConversion(request: types.PreviewConversionRequest): Promise<types.ErrorResponse>;
|
|
11
|
+
}
|
|
12
|
+
export declare function permissionsClient(): PermissionsPlugin;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated permissions plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PermissionsPlugin = void 0;
|
|
5
|
+
exports.permissionsClient = permissionsClient;
|
|
6
|
+
class PermissionsPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'permissions';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async migrateAll(request) {
|
|
14
|
+
const path = '/migrate/all';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async migrateRoles() {
|
|
20
|
+
const path = '/migrate/roles';
|
|
21
|
+
return this.client.request('POST', path);
|
|
22
|
+
}
|
|
23
|
+
async previewConversion(request) {
|
|
24
|
+
const path = '/migrate/preview';
|
|
25
|
+
return this.client.request('POST', path, {
|
|
26
|
+
body: request,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.PermissionsPlugin = PermissionsPlugin;
|
|
31
|
+
function permissionsClient() {
|
|
32
|
+
return new PermissionsPlugin();
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class SecretsPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "secrets";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
list(): Promise<types.ListSecretsResponse>;
|
|
9
|
+
create(): Promise<types.ErrorResponse>;
|
|
10
|
+
get(params: {
|
|
11
|
+
id: string;
|
|
12
|
+
}): Promise<types.ErrorResponse>;
|
|
13
|
+
getValue(params: {
|
|
14
|
+
id: string;
|
|
15
|
+
}): Promise<types.RevealValueResponse>;
|
|
16
|
+
update(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}): Promise<types.ErrorResponse>;
|
|
19
|
+
delete(params: {
|
|
20
|
+
id: string;
|
|
21
|
+
}): Promise<types.SuccessResponse>;
|
|
22
|
+
getByPath(): Promise<types.ErrorResponse>;
|
|
23
|
+
getVersions(params: {
|
|
24
|
+
id: string;
|
|
25
|
+
}): Promise<types.ListVersionsResponse>;
|
|
26
|
+
rollback(params: {
|
|
27
|
+
id: string;
|
|
28
|
+
version: number;
|
|
29
|
+
}, request: types.Rollback_req): Promise<types.ErrorResponse>;
|
|
30
|
+
getStats(): Promise<void>;
|
|
31
|
+
getTree(): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
export declare function secretsClient(): SecretsPlugin;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated secrets plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SecretsPlugin = void 0;
|
|
5
|
+
exports.secretsClient = secretsClient;
|
|
6
|
+
class SecretsPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'secrets';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async list() {
|
|
14
|
+
const path = '/list';
|
|
15
|
+
return this.client.request('GET', path);
|
|
16
|
+
}
|
|
17
|
+
async create() {
|
|
18
|
+
const path = '/create';
|
|
19
|
+
return this.client.request('POST', path);
|
|
20
|
+
}
|
|
21
|
+
async get(params) {
|
|
22
|
+
const path = `/${params.id}`;
|
|
23
|
+
return this.client.request('GET', path);
|
|
24
|
+
}
|
|
25
|
+
async getValue(params) {
|
|
26
|
+
const path = `/${params.id}/value`;
|
|
27
|
+
return this.client.request('GET', path);
|
|
28
|
+
}
|
|
29
|
+
async update(params) {
|
|
30
|
+
const path = `/${params.id}`;
|
|
31
|
+
return this.client.request('PUT', path);
|
|
32
|
+
}
|
|
33
|
+
async delete(params) {
|
|
34
|
+
const path = `/${params.id}`;
|
|
35
|
+
return this.client.request('DELETE', path);
|
|
36
|
+
}
|
|
37
|
+
async getByPath() {
|
|
38
|
+
const path = '/path/*path';
|
|
39
|
+
return this.client.request('GET', path);
|
|
40
|
+
}
|
|
41
|
+
async getVersions(params) {
|
|
42
|
+
const path = `/${params.id}/versions`;
|
|
43
|
+
return this.client.request('GET', path);
|
|
44
|
+
}
|
|
45
|
+
async rollback(params, request) {
|
|
46
|
+
const path = `/${params.id}/rollback/${params.version}`;
|
|
47
|
+
return this.client.request('POST', path, {
|
|
48
|
+
body: request,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
async getStats() {
|
|
52
|
+
const path = '/stats';
|
|
53
|
+
return this.client.request('GET', path);
|
|
54
|
+
}
|
|
55
|
+
async getTree() {
|
|
56
|
+
const path = '/tree';
|
|
57
|
+
return this.client.request('GET', path);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.SecretsPlugin = SecretsPlugin;
|
|
61
|
+
function secretsClient() {
|
|
62
|
+
return new SecretsPlugin();
|
|
63
|
+
}
|
package/dist/plugins/social.d.ts
CHANGED
|
@@ -6,9 +6,18 @@ export declare class SocialPlugin implements ClientPlugin {
|
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
8
|
signIn(request: types.SignInRequest): Promise<types.AuthURLResponse>;
|
|
9
|
-
callback(
|
|
9
|
+
callback(params: {
|
|
10
|
+
provider: string;
|
|
11
|
+
}, query?: {
|
|
12
|
+
state?: string;
|
|
13
|
+
code?: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
errorDescription?: string;
|
|
16
|
+
}): Promise<types.CallbackDataResponse>;
|
|
10
17
|
linkAccount(request: types.LinkAccountRequest): Promise<types.AuthURLResponse>;
|
|
11
|
-
unlinkAccount(
|
|
18
|
+
unlinkAccount(params: {
|
|
19
|
+
provider: string;
|
|
20
|
+
}): Promise<types.MessageResponse>;
|
|
12
21
|
listProviders(): Promise<types.ProvidersResponse>;
|
|
13
22
|
}
|
|
14
23
|
export declare function socialClient(): SocialPlugin;
|
package/dist/plugins/social.js
CHANGED
|
@@ -16,9 +16,11 @@ class SocialPlugin {
|
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
async callback() {
|
|
20
|
-
const path =
|
|
21
|
-
return this.client.request('GET', path
|
|
19
|
+
async callback(params, query) {
|
|
20
|
+
const path = `/callback/${params.provider}`;
|
|
21
|
+
return this.client.request('GET', path, {
|
|
22
|
+
query,
|
|
23
|
+
});
|
|
22
24
|
}
|
|
23
25
|
async linkAccount(request) {
|
|
24
26
|
const path = '/account/link';
|
|
@@ -26,8 +28,8 @@ class SocialPlugin {
|
|
|
26
28
|
body: request,
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
|
-
async unlinkAccount() {
|
|
30
|
-
const path =
|
|
31
|
+
async unlinkAccount(params) {
|
|
32
|
+
const path = `/account/unlink/${params.provider}`;
|
|
31
33
|
return this.client.request('DELETE', path);
|
|
32
34
|
}
|
|
33
35
|
async listProviders() {
|
package/dist/plugins/sso.d.ts
CHANGED
|
@@ -7,9 +7,17 @@ export declare class SsoPlugin implements ClientPlugin {
|
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
8
|
registerProvider(request: types.RegisterProviderRequest): Promise<types.ProviderRegisteredResponse>;
|
|
9
9
|
sAMLSPMetadata(): Promise<types.MetadataResponse>;
|
|
10
|
-
sAMLLogin(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
sAMLLogin(params: {
|
|
11
|
+
providerId: string;
|
|
12
|
+
}, request: types.SAMLLoginRequest): Promise<types.SAMLLoginResponse>;
|
|
13
|
+
sAMLCallback(params: {
|
|
14
|
+
providerId: string;
|
|
15
|
+
}): Promise<types.SSOAuthResponse>;
|
|
16
|
+
oIDCLogin(params: {
|
|
17
|
+
providerId: string;
|
|
18
|
+
}, request: types.OIDCLoginRequest): Promise<types.OIDCLoginResponse>;
|
|
19
|
+
oIDCCallback(params: {
|
|
20
|
+
providerId: string;
|
|
21
|
+
}): Promise<types.SSOAuthResponse>;
|
|
14
22
|
}
|
|
15
23
|
export declare function ssoClient(): SsoPlugin;
|
package/dist/plugins/sso.js
CHANGED
|
@@ -20,24 +20,24 @@ class SsoPlugin {
|
|
|
20
20
|
const path = '/saml2/sp/metadata';
|
|
21
21
|
return this.client.request('GET', path);
|
|
22
22
|
}
|
|
23
|
-
async sAMLLogin(request) {
|
|
24
|
-
const path =
|
|
23
|
+
async sAMLLogin(params, request) {
|
|
24
|
+
const path = `/saml2/login/${params.providerId}`;
|
|
25
25
|
return this.client.request('POST', path, {
|
|
26
26
|
body: request,
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
async sAMLCallback() {
|
|
30
|
-
const path =
|
|
29
|
+
async sAMLCallback(params) {
|
|
30
|
+
const path = `/saml2/callback/${params.providerId}`;
|
|
31
31
|
return this.client.request('POST', path);
|
|
32
32
|
}
|
|
33
|
-
async oIDCLogin(request) {
|
|
34
|
-
const path =
|
|
33
|
+
async oIDCLogin(params, request) {
|
|
34
|
+
const path = `/oidc/login/${params.providerId}`;
|
|
35
35
|
return this.client.request('POST', path, {
|
|
36
36
|
body: request,
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
async oIDCCallback() {
|
|
40
|
-
const path =
|
|
39
|
+
async oIDCCallback(params) {
|
|
40
|
+
const path = `/oidc/callback/${params.providerId}`;
|
|
41
41
|
return this.client.request('GET', path);
|
|
42
42
|
}
|
|
43
43
|
}
|
package/dist/plugins/stepup.d.ts
CHANGED
|
@@ -7,16 +7,26 @@ export declare class StepupPlugin implements ClientPlugin {
|
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
8
|
evaluate(request: types.EvaluateRequest): Promise<void>;
|
|
9
9
|
verify(request: types.VerifyRequest): Promise<void>;
|
|
10
|
-
getRequirement(
|
|
10
|
+
getRequirement(params: {
|
|
11
|
+
id: string;
|
|
12
|
+
}): Promise<void>;
|
|
11
13
|
listPendingRequirements(): Promise<types.RequirementsResponse>;
|
|
12
14
|
listVerifications(): Promise<void>;
|
|
13
15
|
listRememberedDevices(): Promise<types.StepUpDevicesResponse>;
|
|
14
|
-
forgetDevice(
|
|
16
|
+
forgetDevice(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}): Promise<types.ForgetDeviceResponse>;
|
|
15
19
|
createPolicy(request: types.StepUpPolicy): Promise<types.StepUpPolicy>;
|
|
16
20
|
listPolicies(): Promise<void>;
|
|
17
|
-
getPolicy(
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
getPolicy(params: {
|
|
22
|
+
id: string;
|
|
23
|
+
}): Promise<void>;
|
|
24
|
+
updatePolicy(params: {
|
|
25
|
+
id: string;
|
|
26
|
+
}, request: types.StepUpPolicy): Promise<types.StepUpPolicy>;
|
|
27
|
+
deletePolicy(params: {
|
|
28
|
+
id: string;
|
|
29
|
+
}): Promise<void>;
|
|
20
30
|
getAuditLogs(): Promise<void>;
|
|
21
31
|
status(): Promise<void>;
|
|
22
32
|
}
|
package/dist/plugins/stepup.js
CHANGED
|
@@ -22,8 +22,8 @@ class StepupPlugin {
|
|
|
22
22
|
body: request,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
async getRequirement() {
|
|
26
|
-
const path =
|
|
25
|
+
async getRequirement(params) {
|
|
26
|
+
const path = `/requirements/${params.id}`;
|
|
27
27
|
return this.client.request('GET', path);
|
|
28
28
|
}
|
|
29
29
|
async listPendingRequirements() {
|
|
@@ -38,8 +38,8 @@ class StepupPlugin {
|
|
|
38
38
|
const path = '/devices';
|
|
39
39
|
return this.client.request('GET', path);
|
|
40
40
|
}
|
|
41
|
-
async forgetDevice() {
|
|
42
|
-
const path =
|
|
41
|
+
async forgetDevice(params) {
|
|
42
|
+
const path = `/devices/${params.id}`;
|
|
43
43
|
return this.client.request('DELETE', path);
|
|
44
44
|
}
|
|
45
45
|
async createPolicy(request) {
|
|
@@ -52,18 +52,18 @@ class StepupPlugin {
|
|
|
52
52
|
const path = '/policies';
|
|
53
53
|
return this.client.request('GET', path);
|
|
54
54
|
}
|
|
55
|
-
async getPolicy() {
|
|
56
|
-
const path =
|
|
55
|
+
async getPolicy(params) {
|
|
56
|
+
const path = `/policies/${params.id}`;
|
|
57
57
|
return this.client.request('GET', path);
|
|
58
58
|
}
|
|
59
|
-
async updatePolicy(request) {
|
|
60
|
-
const path =
|
|
59
|
+
async updatePolicy(params, request) {
|
|
60
|
+
const path = `/policies/${params.id}`;
|
|
61
61
|
return this.client.request('PUT', path, {
|
|
62
62
|
body: request,
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
async deletePolicy() {
|
|
66
|
-
const path =
|
|
65
|
+
async deletePolicy(params) {
|
|
66
|
+
const path = `/policies/${params.id}`;
|
|
67
67
|
return this.client.request('DELETE', path);
|
|
68
68
|
}
|
|
69
69
|
async getAuditLogs() {
|