@bernierllc/auth-suite 1.4.10 → 1.4.12
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/package.json +4 -4
- package/dist/errors.d.ts +0 -12
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -25
- package/dist/errors.js.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -42
- package/dist/index.js.map +0 -1
- package/dist/managers/audit-manager.d.ts +0 -26
- package/dist/managers/audit-manager.d.ts.map +0 -1
- package/dist/managers/audit-manager.js +0 -160
- package/dist/managers/audit-manager.js.map +0 -1
- package/dist/managers/mfa-manager.d.ts +0 -32
- package/dist/managers/mfa-manager.d.ts.map +0 -1
- package/dist/managers/mfa-manager.js +0 -206
- package/dist/managers/mfa-manager.js.map +0 -1
- package/dist/managers/rbac-manager.d.ts +0 -25
- package/dist/managers/rbac-manager.d.ts.map +0 -1
- package/dist/managers/rbac-manager.js +0 -192
- package/dist/managers/rbac-manager.js.map +0 -1
- package/dist/managers/session-manager.d.ts +0 -20
- package/dist/managers/session-manager.d.ts.map +0 -1
- package/dist/managers/session-manager.js +0 -110
- package/dist/managers/session-manager.js.map +0 -1
- package/dist/suite.d.ts +0 -172
- package/dist/suite.d.ts.map +0 -1
- package/dist/suite.js +0 -1145
- package/dist/suite.js.map +0 -1
- package/dist/types.d.ts +0 -250
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -10
- package/dist/types.js.map +0 -1
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright (c) 2025 Bernier LLC
|
|
4
|
-
|
|
5
|
-
This file is licensed to the client under a limited-use license.
|
|
6
|
-
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
-
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.BasicRBACManager = void 0;
|
|
11
|
-
/**
|
|
12
|
-
* Basic in-memory RBAC manager
|
|
13
|
-
* For production use, consider database storage
|
|
14
|
-
*/
|
|
15
|
-
class BasicRBACManager {
|
|
16
|
-
userRoles = new Map();
|
|
17
|
-
roles;
|
|
18
|
-
permissions;
|
|
19
|
-
hierarchical;
|
|
20
|
-
constructor(config) {
|
|
21
|
-
this.hierarchical = config.hierarchical || false;
|
|
22
|
-
this.roles = new Map(config.roles?.map((role) => [role.name, role]) || []);
|
|
23
|
-
this.permissions = new Map(config.permissions?.map((perm) => [perm.name, perm]) || []);
|
|
24
|
-
}
|
|
25
|
-
async checkPermission(check) {
|
|
26
|
-
const userRoles = await this.getUserRoles(check.userId);
|
|
27
|
-
if (userRoles.length === 0) {
|
|
28
|
-
return {
|
|
29
|
-
allowed: false,
|
|
30
|
-
reason: 'User has no roles assigned'
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
// Get all permissions for user's roles
|
|
34
|
-
const userPermissions = new Set();
|
|
35
|
-
for (const roleName of userRoles) {
|
|
36
|
-
const rolePermissions = await this.getRolePermissions(roleName);
|
|
37
|
-
rolePermissions.forEach(perm => userPermissions.add(perm));
|
|
38
|
-
}
|
|
39
|
-
// Check for exact permission match
|
|
40
|
-
const requiredPermission = `${check.resource}:${check.action}`;
|
|
41
|
-
if (userPermissions.has(requiredPermission)) {
|
|
42
|
-
return {
|
|
43
|
-
allowed: true,
|
|
44
|
-
reason: 'Direct permission match'
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
// Check for wildcard permissions
|
|
48
|
-
const wildcardPermission = `${check.resource}:*`;
|
|
49
|
-
if (userPermissions.has(wildcardPermission)) {
|
|
50
|
-
return {
|
|
51
|
-
allowed: true,
|
|
52
|
-
reason: 'Wildcard permission match'
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
// Check for global admin permission
|
|
56
|
-
if (userPermissions.has('*:*')) {
|
|
57
|
-
return {
|
|
58
|
-
allowed: true,
|
|
59
|
-
reason: 'Global admin permission'
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
// Check permission conditions if available
|
|
63
|
-
const permission = this.permissions.get(requiredPermission);
|
|
64
|
-
if (permission && permission.conditions) {
|
|
65
|
-
const conditionsMet = await this.checkConditions(permission.conditions, check.context || {});
|
|
66
|
-
if (conditionsMet) {
|
|
67
|
-
return {
|
|
68
|
-
allowed: true,
|
|
69
|
-
reason: 'Permission conditions satisfied'
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
allowed: false,
|
|
75
|
-
reason: `No permission found for ${requiredPermission}`
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
async getUserRoles(userId) {
|
|
79
|
-
const roleSet = this.userRoles.get(userId) || new Set();
|
|
80
|
-
const roles = Array.from(roleSet);
|
|
81
|
-
// If hierarchical, include inherited roles
|
|
82
|
-
if (this.hierarchical) {
|
|
83
|
-
const inheritedRoles = new Set();
|
|
84
|
-
for (const roleName of roles) {
|
|
85
|
-
this.addInheritedRoles(roleName, inheritedRoles);
|
|
86
|
-
}
|
|
87
|
-
return Array.from(new Set([...roles, ...inheritedRoles]));
|
|
88
|
-
}
|
|
89
|
-
return roles;
|
|
90
|
-
}
|
|
91
|
-
async assignRole(userId, role) {
|
|
92
|
-
if (!this.roles.has(role)) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
const userRoleSet = this.userRoles.get(userId) || new Set();
|
|
96
|
-
userRoleSet.add(role);
|
|
97
|
-
this.userRoles.set(userId, userRoleSet);
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
async revokeRole(userId, role) {
|
|
101
|
-
const userRoleSet = this.userRoles.get(userId);
|
|
102
|
-
if (!userRoleSet) {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
const removed = userRoleSet.delete(role);
|
|
106
|
-
if (userRoleSet.size === 0) {
|
|
107
|
-
this.userRoles.delete(userId);
|
|
108
|
-
}
|
|
109
|
-
return removed;
|
|
110
|
-
}
|
|
111
|
-
async getRolePermissions(roleName) {
|
|
112
|
-
const role = this.roles.get(roleName);
|
|
113
|
-
if (!role) {
|
|
114
|
-
return [];
|
|
115
|
-
}
|
|
116
|
-
return role.permissions || [];
|
|
117
|
-
}
|
|
118
|
-
// Additional methods for role/permission management
|
|
119
|
-
async createRole(role) {
|
|
120
|
-
if (this.roles.has(role.name)) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
this.roles.set(role.name, role);
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
async deleteRole(roleName) {
|
|
127
|
-
const deleted = this.roles.delete(roleName);
|
|
128
|
-
if (deleted) {
|
|
129
|
-
// Remove role from all users
|
|
130
|
-
for (const [userId, userRoles] of this.userRoles.entries()) {
|
|
131
|
-
userRoles.delete(roleName);
|
|
132
|
-
if (userRoles.size === 0) {
|
|
133
|
-
this.userRoles.delete(userId);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return deleted;
|
|
138
|
-
}
|
|
139
|
-
async updateRolePermissions(roleName, permissions) {
|
|
140
|
-
const role = this.roles.get(roleName);
|
|
141
|
-
if (!role) {
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
role.permissions = permissions;
|
|
145
|
-
this.roles.set(roleName, role);
|
|
146
|
-
return true;
|
|
147
|
-
}
|
|
148
|
-
async createPermission(permission) {
|
|
149
|
-
const permissionKey = `${permission.resource}:${permission.actions.join(',')}`;
|
|
150
|
-
if (this.permissions.has(permissionKey)) {
|
|
151
|
-
return false;
|
|
152
|
-
}
|
|
153
|
-
this.permissions.set(permissionKey, permission);
|
|
154
|
-
return true;
|
|
155
|
-
}
|
|
156
|
-
// Private helper methods
|
|
157
|
-
addInheritedRoles(roleName, inheritedRoles) {
|
|
158
|
-
const role = this.roles.get(roleName);
|
|
159
|
-
if (!role || !role.parent) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
inheritedRoles.add(role.parent);
|
|
163
|
-
this.addInheritedRoles(role.parent, inheritedRoles);
|
|
164
|
-
}
|
|
165
|
-
async checkConditions(conditions, context) {
|
|
166
|
-
for (const condition of conditions) {
|
|
167
|
-
const contextValue = context[condition.field];
|
|
168
|
-
if (!this.evaluateCondition(contextValue, condition.operator, condition.value)) {
|
|
169
|
-
return false;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
return true;
|
|
173
|
-
}
|
|
174
|
-
evaluateCondition(contextValue, operator, conditionValue) {
|
|
175
|
-
switch (operator) {
|
|
176
|
-
case 'equals':
|
|
177
|
-
return contextValue === conditionValue;
|
|
178
|
-
case 'contains':
|
|
179
|
-
return typeof contextValue === 'string' && contextValue.includes(conditionValue);
|
|
180
|
-
case 'startsWith':
|
|
181
|
-
return typeof contextValue === 'string' && contextValue.startsWith(conditionValue);
|
|
182
|
-
case 'endsWith':
|
|
183
|
-
return typeof contextValue === 'string' && contextValue.endsWith(conditionValue);
|
|
184
|
-
case 'regex':
|
|
185
|
-
return typeof contextValue === 'string' && new RegExp(conditionValue).test(contextValue);
|
|
186
|
-
default:
|
|
187
|
-
return false;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
exports.BasicRBACManager = BasicRBACManager;
|
|
192
|
-
//# sourceMappingURL=rbac-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rbac-manager.js","sourceRoot":"","sources":["../../src/managers/rbac-manager.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AAUF;;;GAGG;AACH,MAAa,gBAAgB;IACnB,SAAS,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC3C,KAAK,CAA8B;IACnC,WAAW,CAAoC;IAC/C,YAAY,CAAU;IAE9B,YAAY,MAAW;QACrB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,I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QAAQ;gBACX,OAAO,YAAY,KAAK,cAAc,CAAC;YACzC,KAAK,UAAU;gBACb,OAAO,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;YACnF,KAAK,YAAY;gBACf,OAAO,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;YACrF,KAAK,UAAU;gBACb,OAAO,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;YACnF,KAAK,OAAO;gBACV,OAAO,OAAO,YAAY,KAAK,QAAQ,IAAI,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC3F;gBACE,OAAO,KAAK,CAAC;QACjB,CAAC;IACH,CAAC;CACF;AAtND,4CAsNC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { SessionData, SessionManager } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* In-memory session manager
|
|
4
|
-
* For production use, consider Redis or database storage
|
|
5
|
-
*/
|
|
6
|
-
export declare class MemorySessionManager implements SessionManager {
|
|
7
|
-
private sessions;
|
|
8
|
-
private config;
|
|
9
|
-
private cleanupInterval?;
|
|
10
|
-
constructor(config: any);
|
|
11
|
-
create(userId: string, metadata?: Record<string, any>): Promise<SessionData>;
|
|
12
|
-
get(sessionId: string): Promise<SessionData | null>;
|
|
13
|
-
update(sessionId: string, updates: Partial<SessionData>): Promise<boolean>;
|
|
14
|
-
destroy(sessionId: string): Promise<boolean>;
|
|
15
|
-
destroyAllForUser(userId: string): Promise<number>;
|
|
16
|
-
cleanup(): Promise<number>;
|
|
17
|
-
private startCleanupTimer;
|
|
18
|
-
destroyManager(): void;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=session-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-manager.d.ts","sourceRoot":"","sources":["../../src/managers/session-manager.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE5D;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,cAAc;IACzD,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,eAAe,CAAC,CAAiC;gBAE7C,MAAM,EAAE,GAAG;IAQjB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAkB5E,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAoBnD,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAY1E,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5C,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAalD,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAkBhC,OAAO,CAAC,iBAAiB;IAazB,cAAc,IAAI,IAAI;CAKvB"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright (c) 2025 Bernier LLC
|
|
4
|
-
|
|
5
|
-
This file is licensed to the client under a limited-use license.
|
|
6
|
-
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
-
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.MemorySessionManager = void 0;
|
|
11
|
-
const uuid_1 = require("uuid");
|
|
12
|
-
/**
|
|
13
|
-
* In-memory session manager
|
|
14
|
-
* For production use, consider Redis or database storage
|
|
15
|
-
*/
|
|
16
|
-
class MemorySessionManager {
|
|
17
|
-
sessions = new Map();
|
|
18
|
-
config;
|
|
19
|
-
cleanupInterval;
|
|
20
|
-
constructor(config) {
|
|
21
|
-
this.config = config;
|
|
22
|
-
if (config.cleanup?.enabled) {
|
|
23
|
-
this.startCleanupTimer();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
async create(userId, metadata) {
|
|
27
|
-
const sessionId = (0, uuid_1.v4)();
|
|
28
|
-
const now = new Date();
|
|
29
|
-
const expiresAt = new Date(now.getTime() + (this.config.persistence?.ttl || 24 * 60 * 60 * 1000));
|
|
30
|
-
const session = {
|
|
31
|
-
sessionId,
|
|
32
|
-
userId,
|
|
33
|
-
createdAt: now,
|
|
34
|
-
lastAccessedAt: now,
|
|
35
|
-
expiresAt,
|
|
36
|
-
metadata: metadata || {}
|
|
37
|
-
};
|
|
38
|
-
this.sessions.set(sessionId, session);
|
|
39
|
-
return session;
|
|
40
|
-
}
|
|
41
|
-
async get(sessionId) {
|
|
42
|
-
const session = this.sessions.get(sessionId);
|
|
43
|
-
if (!session) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
// Check if session has expired
|
|
47
|
-
if (session.expiresAt < new Date()) {
|
|
48
|
-
this.sessions.delete(sessionId);
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
// Update last accessed time
|
|
52
|
-
session.lastAccessedAt = new Date();
|
|
53
|
-
this.sessions.set(sessionId, session);
|
|
54
|
-
return session;
|
|
55
|
-
}
|
|
56
|
-
async update(sessionId, updates) {
|
|
57
|
-
const session = this.sessions.get(sessionId);
|
|
58
|
-
if (!session) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
const updatedSession = { ...session, ...updates };
|
|
62
|
-
this.sessions.set(sessionId, updatedSession);
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
async destroy(sessionId) {
|
|
66
|
-
return this.sessions.delete(sessionId);
|
|
67
|
-
}
|
|
68
|
-
async destroyAllForUser(userId) {
|
|
69
|
-
let count = 0;
|
|
70
|
-
for (const [sessionId, session] of this.sessions.entries()) {
|
|
71
|
-
if (session.userId === userId) {
|
|
72
|
-
this.sessions.delete(sessionId);
|
|
73
|
-
count++;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return count;
|
|
77
|
-
}
|
|
78
|
-
async cleanup() {
|
|
79
|
-
const now = new Date();
|
|
80
|
-
const maxIdleMs = this.config.cleanup?.maxIdleMs || 24 * 60 * 60 * 1000;
|
|
81
|
-
let cleaned = 0;
|
|
82
|
-
for (const [sessionId, session] of this.sessions.entries()) {
|
|
83
|
-
const isExpired = session.expiresAt < now;
|
|
84
|
-
const isIdle = (now.getTime() - session.lastAccessedAt.getTime()) > maxIdleMs;
|
|
85
|
-
if (isExpired || isIdle) {
|
|
86
|
-
this.sessions.delete(sessionId);
|
|
87
|
-
cleaned++;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return cleaned;
|
|
91
|
-
}
|
|
92
|
-
startCleanupTimer() {
|
|
93
|
-
const intervalMs = this.config.cleanup?.intervalMs || 60000; // Default 1 minute
|
|
94
|
-
this.cleanupInterval = setInterval(async () => {
|
|
95
|
-
const cleaned = await this.cleanup();
|
|
96
|
-
if (cleaned > 0) {
|
|
97
|
-
// Optionally log cleanup activity
|
|
98
|
-
// eslint-disable-next-line no-console
|
|
99
|
-
console.log(`Cleaned up ${cleaned} expired sessions`);
|
|
100
|
-
}
|
|
101
|
-
}, intervalMs);
|
|
102
|
-
}
|
|
103
|
-
destroyManager() {
|
|
104
|
-
if (this.cleanupInterval) {
|
|
105
|
-
clearInterval(this.cleanupInterval);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
exports.MemorySessionManager = MemorySessionManager;
|
|
110
|
-
//# sourceMappingURL=session-manager.js.map
|
|
@@ -1 +0,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F;AApHD,oDAoHC"}
|
package/dist/suite.d.ts
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import type { AuthSuiteConfig, AuthSuiteResult, PermissionCheck, PermissionResult, RegisterCredentials, LoginCredentials, User, EmailVerificationResult } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Complete authentication suite providing comprehensive auth functionality
|
|
4
|
-
*
|
|
5
|
-
* Features:
|
|
6
|
-
* - Full authentication service capabilities
|
|
7
|
-
* - Enhanced session management with cleanup
|
|
8
|
-
* - Role-based access control (RBAC)
|
|
9
|
-
* - Multi-factor authentication (MFA)
|
|
10
|
-
* - Comprehensive audit logging
|
|
11
|
-
* - OAuth/SAML/LDAP integration support
|
|
12
|
-
* - Advanced security features
|
|
13
|
-
*/
|
|
14
|
-
export declare class AuthSuite {
|
|
15
|
-
private authService;
|
|
16
|
-
private sessionManager;
|
|
17
|
-
private rbacManager;
|
|
18
|
-
private mfaManager;
|
|
19
|
-
private auditManager;
|
|
20
|
-
private logger;
|
|
21
|
-
private config;
|
|
22
|
-
private emailSender?;
|
|
23
|
-
private neverhubAdapter?;
|
|
24
|
-
private verificationTokens;
|
|
25
|
-
constructor(config: AuthSuiteConfig);
|
|
26
|
-
/**
|
|
27
|
-
* Register a new user with enhanced features
|
|
28
|
-
*/
|
|
29
|
-
register(credentials: RegisterCredentials): Promise<AuthSuiteResult>;
|
|
30
|
-
/**
|
|
31
|
-
* Login user with enhanced security features
|
|
32
|
-
*/
|
|
33
|
-
login(credentials: LoginCredentials): Promise<AuthSuiteResult>;
|
|
34
|
-
/**
|
|
35
|
-
* Complete MFA verification and finish login
|
|
36
|
-
*/
|
|
37
|
-
completeMfaLogin(challengeId: string, response: string): Promise<AuthSuiteResult>;
|
|
38
|
-
/**
|
|
39
|
-
* Verify token with enhanced session management
|
|
40
|
-
*/
|
|
41
|
-
verifyToken(token: string): Promise<User | null>;
|
|
42
|
-
/**
|
|
43
|
-
* Check user permission with RBAC
|
|
44
|
-
*/
|
|
45
|
-
checkPermission(check: PermissionCheck): Promise<PermissionResult>;
|
|
46
|
-
/**
|
|
47
|
-
* Get user roles
|
|
48
|
-
*/
|
|
49
|
-
getUserRoles(userId: string): Promise<string[]>;
|
|
50
|
-
/**
|
|
51
|
-
* Get user permissions (all permissions from all roles)
|
|
52
|
-
*/
|
|
53
|
-
getUserPermissions(userId: string): Promise<string[]>;
|
|
54
|
-
/**
|
|
55
|
-
* Logout user and cleanup session
|
|
56
|
-
*/
|
|
57
|
-
logout(sessionId?: string): Promise<{
|
|
58
|
-
success: boolean;
|
|
59
|
-
}>;
|
|
60
|
-
/**
|
|
61
|
-
* Setup MFA for user
|
|
62
|
-
*/
|
|
63
|
-
setupMfa(userId: string, type: string): Promise<{
|
|
64
|
-
secret: string;
|
|
65
|
-
qrCode?: string;
|
|
66
|
-
}>;
|
|
67
|
-
/**
|
|
68
|
-
* Get audit logs with filtering
|
|
69
|
-
*/
|
|
70
|
-
getAuditLogs(filters: any): Promise<any[]>;
|
|
71
|
-
/**
|
|
72
|
-
* Cleanup expired sessions and audit logs
|
|
73
|
-
*/
|
|
74
|
-
cleanup(): Promise<{
|
|
75
|
-
sessions: number;
|
|
76
|
-
auditLogs: number;
|
|
77
|
-
}>;
|
|
78
|
-
/**
|
|
79
|
-
* Send verification email to user
|
|
80
|
-
*/
|
|
81
|
-
private sendVerificationEmail;
|
|
82
|
-
/**
|
|
83
|
-
* Manually send verification email to a user
|
|
84
|
-
*/
|
|
85
|
-
sendVerificationEmailManually(userId: string, email: string): Promise<{
|
|
86
|
-
success: boolean;
|
|
87
|
-
error?: string;
|
|
88
|
-
}>;
|
|
89
|
-
/**
|
|
90
|
-
* Get email configuration status
|
|
91
|
-
*/
|
|
92
|
-
getEmailConfiguration(): {
|
|
93
|
-
enabled: boolean;
|
|
94
|
-
verification: {
|
|
95
|
-
enabled: boolean;
|
|
96
|
-
required: boolean;
|
|
97
|
-
automaticSend: boolean;
|
|
98
|
-
};
|
|
99
|
-
welcome: {
|
|
100
|
-
enabled: boolean;
|
|
101
|
-
sendOnRegistration: boolean;
|
|
102
|
-
sendOnFirstLogin: boolean;
|
|
103
|
-
};
|
|
104
|
-
passwordReset: {
|
|
105
|
-
enabled: boolean;
|
|
106
|
-
};
|
|
107
|
-
providerConfigured: boolean;
|
|
108
|
-
neverhub: {
|
|
109
|
-
enabled: boolean;
|
|
110
|
-
available: boolean;
|
|
111
|
-
overrideDirect: boolean;
|
|
112
|
-
fallbackToDirect: boolean;
|
|
113
|
-
serviceName: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* Verify user email with token
|
|
118
|
-
*/
|
|
119
|
-
verifyEmail(token: string): Promise<EmailVerificationResult>;
|
|
120
|
-
/**
|
|
121
|
-
* Send password reset email
|
|
122
|
-
*/
|
|
123
|
-
sendPasswordResetEmail(email: string): Promise<{
|
|
124
|
-
success: boolean;
|
|
125
|
-
error?: string;
|
|
126
|
-
}>;
|
|
127
|
-
private mergeWithDefaults;
|
|
128
|
-
/**
|
|
129
|
-
* Initialize NeverHub adapter if configured and available
|
|
130
|
-
*/
|
|
131
|
-
private initializeNeverHub;
|
|
132
|
-
private initializeManagers;
|
|
133
|
-
private completeLogin;
|
|
134
|
-
private isMfaRequired;
|
|
135
|
-
/**
|
|
136
|
-
* Check if verification email should be sent
|
|
137
|
-
*/
|
|
138
|
-
private shouldSendVerificationEmail;
|
|
139
|
-
/**
|
|
140
|
-
* Check if welcome email should be sent
|
|
141
|
-
*/
|
|
142
|
-
private shouldSendWelcomeEmail;
|
|
143
|
-
/**
|
|
144
|
-
* Build verification URL with token
|
|
145
|
-
*/
|
|
146
|
-
private buildVerificationUrl;
|
|
147
|
-
/**
|
|
148
|
-
* Process template variables in content
|
|
149
|
-
*/
|
|
150
|
-
private processTemplate;
|
|
151
|
-
/**
|
|
152
|
-
* Send email with NeverHub integration and fallback logic
|
|
153
|
-
*/
|
|
154
|
-
private sendEmailWithNeverHubFallback;
|
|
155
|
-
/**
|
|
156
|
-
* Send email via NeverHub service discovery
|
|
157
|
-
*/
|
|
158
|
-
private sendEmailViaNeverHub;
|
|
159
|
-
/**
|
|
160
|
-
* Check if NeverHub should be used for email sending
|
|
161
|
-
*/
|
|
162
|
-
private shouldUseNeverHub;
|
|
163
|
-
/**
|
|
164
|
-
* Send email with retry logic
|
|
165
|
-
*/
|
|
166
|
-
private sendEmailWithRetry;
|
|
167
|
-
/**
|
|
168
|
-
* Send welcome email to user
|
|
169
|
-
*/
|
|
170
|
-
private sendWelcomeEmail;
|
|
171
|
-
}
|
|
172
|
-
//# sourceMappingURL=suite.d.ts.map
|
package/dist/suite.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"suite.d.ts","sourceRoot":"","sources":["../src/suite.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAKf,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,IAAI,EACJ,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAMjB;;;;;;;;;;;GAWG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,eAAe,CAAC,CAAkB;IAC1C,OAAO,CAAC,kBAAkB,CAAuH;gBAErI,MAAM,EAAE,eAAe;IA0CnC;;OAEG;IACG,QAAQ,CAAC,WAAW,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC;IAyG1E;;OAEG;IACG,KAAK,CAAC,WAAW,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAiEpE;;OAEG;IACG,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