@aepstore-dev/contracts 1.99.0 → 1.100.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/gen/auth.d.ts +13 -0
- package/gen/auth.js +1 -0
- package/gen/auth.ts +20 -0
- package/package.json +1 -1
- package/proto/auth.proto +24 -10
package/gen/auth.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface CreateCodeRequest {
|
|
|
38
38
|
/**
|
|
39
39
|
* type ∈ { twofa, twofa_activate, twofa_deactivate, reset, totp, totp_activate,
|
|
40
40
|
* totp_deactivate, backup, regenerate_backup, confirm }
|
|
41
|
+
* regenerate_backup expects a current TOTP code, not an existing backup code.
|
|
41
42
|
* new_password is only used by the 'reset' flow.
|
|
42
43
|
*/
|
|
43
44
|
export interface VerifyCodeRequest {
|
|
@@ -72,6 +73,11 @@ export interface Get2faStatusRequest {
|
|
|
72
73
|
export interface GetProfileRequest {
|
|
73
74
|
userId: string;
|
|
74
75
|
}
|
|
76
|
+
export interface ResetUserTwoFactorRequest {
|
|
77
|
+
targetUserId: string;
|
|
78
|
+
adminId: string;
|
|
79
|
+
reason: string;
|
|
80
|
+
}
|
|
75
81
|
export interface AuthUser {
|
|
76
82
|
id: string;
|
|
77
83
|
username: string;
|
|
@@ -139,6 +145,11 @@ export interface LogoutResponse {
|
|
|
139
145
|
/** number of refresh-token rows deleted */
|
|
140
146
|
removed: number;
|
|
141
147
|
}
|
|
148
|
+
export interface ResetUserTwoFactorResponse {
|
|
149
|
+
ok: boolean;
|
|
150
|
+
previousType: TwoFactorType;
|
|
151
|
+
revokedSessions: number;
|
|
152
|
+
}
|
|
142
153
|
export interface RestoreLoginRequest {
|
|
143
154
|
/** email or username */
|
|
144
155
|
credentials: string;
|
|
@@ -186,6 +197,7 @@ export interface AuthServiceClient {
|
|
|
186
197
|
get2FaStatus(request: Get2faStatusRequest): Observable<TwoFactorStatusResponse>;
|
|
187
198
|
getProfile(request: GetProfileRequest): Observable<AuthUser>;
|
|
188
199
|
cleanupExpiredTotpSetups(request: Empty): Observable<Empty>;
|
|
200
|
+
resetUserTwoFactor(request: ResetUserTwoFactorRequest): Observable<ResetUserTwoFactorResponse>;
|
|
189
201
|
/**
|
|
190
202
|
* Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
191
203
|
* HMAC matches; LogoutAll wipes every row for the user.
|
|
@@ -222,6 +234,7 @@ export interface AuthServiceController {
|
|
|
222
234
|
get2FaStatus(request: Get2faStatusRequest): Promise<TwoFactorStatusResponse> | Observable<TwoFactorStatusResponse> | TwoFactorStatusResponse;
|
|
223
235
|
getProfile(request: GetProfileRequest): Promise<AuthUser> | Observable<AuthUser> | AuthUser;
|
|
224
236
|
cleanupExpiredTotpSetups(request: Empty): Promise<Empty> | Observable<Empty> | Empty;
|
|
237
|
+
resetUserTwoFactor(request: ResetUserTwoFactorRequest): Promise<ResetUserTwoFactorResponse> | Observable<ResetUserTwoFactorResponse> | ResetUserTwoFactorResponse;
|
|
225
238
|
/**
|
|
226
239
|
* Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
227
240
|
* HMAC matches; LogoutAll wipes every row for the user.
|
package/gen/auth.js
CHANGED
package/gen/auth.ts
CHANGED
|
@@ -52,6 +52,7 @@ export interface CreateCodeRequest {
|
|
|
52
52
|
/**
|
|
53
53
|
* type ∈ { twofa, twofa_activate, twofa_deactivate, reset, totp, totp_activate,
|
|
54
54
|
* totp_deactivate, backup, regenerate_backup, confirm }
|
|
55
|
+
* regenerate_backup expects a current TOTP code, not an existing backup code.
|
|
55
56
|
* new_password is only used by the 'reset' flow.
|
|
56
57
|
*/
|
|
57
58
|
export interface VerifyCodeRequest {
|
|
@@ -91,6 +92,12 @@ export interface GetProfileRequest {
|
|
|
91
92
|
userId: string;
|
|
92
93
|
}
|
|
93
94
|
|
|
95
|
+
export interface ResetUserTwoFactorRequest {
|
|
96
|
+
targetUserId: string;
|
|
97
|
+
adminId: string;
|
|
98
|
+
reason: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
94
101
|
export interface AuthUser {
|
|
95
102
|
id: string;
|
|
96
103
|
username: string;
|
|
@@ -165,6 +172,12 @@ export interface LogoutResponse {
|
|
|
165
172
|
removed: number;
|
|
166
173
|
}
|
|
167
174
|
|
|
175
|
+
export interface ResetUserTwoFactorResponse {
|
|
176
|
+
ok: boolean;
|
|
177
|
+
previousType: TwoFactorType;
|
|
178
|
+
revokedSessions: number;
|
|
179
|
+
}
|
|
180
|
+
|
|
168
181
|
export interface RestoreLoginRequest {
|
|
169
182
|
/** email or username */
|
|
170
183
|
credentials: string;
|
|
@@ -227,6 +240,8 @@ export interface AuthServiceClient {
|
|
|
227
240
|
|
|
228
241
|
cleanupExpiredTotpSetups(request: Empty): Observable<Empty>;
|
|
229
242
|
|
|
243
|
+
resetUserTwoFactor(request: ResetUserTwoFactorRequest): Observable<ResetUserTwoFactorResponse>;
|
|
244
|
+
|
|
230
245
|
/**
|
|
231
246
|
* Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
232
247
|
* HMAC matches; LogoutAll wipes every row for the user.
|
|
@@ -282,6 +297,10 @@ export interface AuthServiceController {
|
|
|
282
297
|
|
|
283
298
|
cleanupExpiredTotpSetups(request: Empty): Promise<Empty> | Observable<Empty> | Empty;
|
|
284
299
|
|
|
300
|
+
resetUserTwoFactor(
|
|
301
|
+
request: ResetUserTwoFactorRequest,
|
|
302
|
+
): Promise<ResetUserTwoFactorResponse> | Observable<ResetUserTwoFactorResponse> | ResetUserTwoFactorResponse;
|
|
303
|
+
|
|
285
304
|
/**
|
|
286
305
|
* Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
287
306
|
* HMAC matches; LogoutAll wipes every row for the user.
|
|
@@ -321,6 +340,7 @@ export function AuthServiceControllerMethods() {
|
|
|
321
340
|
"get2FaStatus",
|
|
322
341
|
"getProfile",
|
|
323
342
|
"cleanupExpiredTotpSetups",
|
|
343
|
+
"resetUserTwoFactor",
|
|
324
344
|
"logoutCurrent",
|
|
325
345
|
"logoutAll",
|
|
326
346
|
"restoreLogin",
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -15,9 +15,10 @@ service AuthService {
|
|
|
15
15
|
rpc VerifyCode(VerifyCodeRequest) returns (AuthResult);
|
|
16
16
|
rpc CheckToken(CheckTokenRequest) returns (AuthUser);
|
|
17
17
|
rpc RefreshToken(RefreshTokenRequest) returns (AuthResult);
|
|
18
|
-
rpc Get2faStatus(Get2faStatusRequest) returns (TwoFactorStatusResponse);
|
|
19
|
-
rpc GetProfile(GetProfileRequest) returns (AuthUser);
|
|
20
|
-
rpc CleanupExpiredTotpSetups(Empty) returns (Empty);
|
|
18
|
+
rpc Get2faStatus(Get2faStatusRequest) returns (TwoFactorStatusResponse);
|
|
19
|
+
rpc GetProfile(GetProfileRequest) returns (AuthUser);
|
|
20
|
+
rpc CleanupExpiredTotpSetups(Empty) returns (Empty);
|
|
21
|
+
rpc ResetUserTwoFactor(ResetUserTwoFactorRequest) returns (ResetUserTwoFactorResponse);
|
|
21
22
|
|
|
22
23
|
// Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
23
24
|
// HMAC matches; LogoutAll wipes every row for the user.
|
|
@@ -73,6 +74,7 @@ message CreateCodeRequest {
|
|
|
73
74
|
|
|
74
75
|
// type ∈ { twofa, twofa_activate, twofa_deactivate, reset, totp, totp_activate,
|
|
75
76
|
// totp_deactivate, backup, regenerate_backup, confirm }
|
|
77
|
+
// regenerate_backup expects a current TOTP code, not an existing backup code.
|
|
76
78
|
// new_password is only used by the 'reset' flow.
|
|
77
79
|
message VerifyCodeRequest {
|
|
78
80
|
string email = 1;
|
|
@@ -102,9 +104,15 @@ message Get2faStatusRequest {
|
|
|
102
104
|
string username = 1;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
message GetProfileRequest {
|
|
106
|
-
string user_id = 1;
|
|
107
|
-
}
|
|
107
|
+
message GetProfileRequest {
|
|
108
|
+
string user_id = 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message ResetUserTwoFactorRequest {
|
|
112
|
+
string target_user_id = 1;
|
|
113
|
+
string admin_id = 2;
|
|
114
|
+
string reason = 3;
|
|
115
|
+
}
|
|
108
116
|
|
|
109
117
|
// ---------------------------------------------------------------------------
|
|
110
118
|
// Responses
|
|
@@ -177,10 +185,16 @@ message LogoutAllRequest {
|
|
|
177
185
|
string refresh_token = 2;
|
|
178
186
|
}
|
|
179
187
|
|
|
180
|
-
message LogoutResponse {
|
|
181
|
-
bool ok = 1;
|
|
182
|
-
int32 removed = 2; // number of refresh-token rows deleted
|
|
183
|
-
}
|
|
188
|
+
message LogoutResponse {
|
|
189
|
+
bool ok = 1;
|
|
190
|
+
int32 removed = 2; // number of refresh-token rows deleted
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
message ResetUserTwoFactorResponse {
|
|
194
|
+
bool ok = 1;
|
|
195
|
+
TwoFactorType previous_type = 2;
|
|
196
|
+
int32 revoked_sessions = 3;
|
|
197
|
+
}
|
|
184
198
|
|
|
185
199
|
message RestoreLoginRequest {
|
|
186
200
|
string credentials = 1; // email or username
|