@aepstore-dev/contracts 1.99.0 → 1.101.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 +80 -0
- package/gen/auth.js +7 -0
- package/gen/auth.ts +132 -0
- package/package.json +1 -1
- package/proto/auth.proto +94 -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,42 @@ 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
|
+
}
|
|
81
|
+
export interface GeneratePasskeyRegistrationOptionsRequest {
|
|
82
|
+
userId: string;
|
|
83
|
+
}
|
|
84
|
+
export interface VerifyPasskeyRegistrationRequest {
|
|
85
|
+
userId: string;
|
|
86
|
+
challengeId: string;
|
|
87
|
+
/** Raw JSON returned by @simplewebauthn/browser startRegistration(). */
|
|
88
|
+
responseJson: string;
|
|
89
|
+
name: string;
|
|
90
|
+
}
|
|
91
|
+
export interface ListPasskeysRequest {
|
|
92
|
+
userId: string;
|
|
93
|
+
}
|
|
94
|
+
export interface DeletePasskeyRequest {
|
|
95
|
+
userId: string;
|
|
96
|
+
passkeyId: string;
|
|
97
|
+
}
|
|
98
|
+
export interface GeneratePasskeyAuthenticationOptionsRequest {
|
|
99
|
+
/**
|
|
100
|
+
* Username or email. V1 requires an existing account identifier and does
|
|
101
|
+
* not implement passkey-first/account-discovery registration.
|
|
102
|
+
*/
|
|
103
|
+
credentials: string;
|
|
104
|
+
}
|
|
105
|
+
export interface VerifyPasskeyAuthenticationRequest {
|
|
106
|
+
challengeId: string;
|
|
107
|
+
/** Raw JSON returned by @simplewebauthn/browser startAuthentication(). */
|
|
108
|
+
responseJson: string;
|
|
109
|
+
userAgent: string;
|
|
110
|
+
ip: string;
|
|
111
|
+
}
|
|
75
112
|
export interface AuthUser {
|
|
76
113
|
id: string;
|
|
77
114
|
username: string;
|
|
@@ -139,6 +176,35 @@ export interface LogoutResponse {
|
|
|
139
176
|
/** number of refresh-token rows deleted */
|
|
140
177
|
removed: number;
|
|
141
178
|
}
|
|
179
|
+
export interface ResetUserTwoFactorResponse {
|
|
180
|
+
ok: boolean;
|
|
181
|
+
previousType: TwoFactorType;
|
|
182
|
+
revokedSessions: number;
|
|
183
|
+
}
|
|
184
|
+
export interface PasskeyOptionsResponse {
|
|
185
|
+
/** PublicKeyCredentialCreationOptionsJSON or PublicKeyCredentialRequestOptionsJSON. */
|
|
186
|
+
optionsJson: string;
|
|
187
|
+
challengeId: string;
|
|
188
|
+
}
|
|
189
|
+
export interface PasskeyInfo {
|
|
190
|
+
id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
createdAt: string;
|
|
193
|
+
lastUsedAt: string;
|
|
194
|
+
deviceType: string;
|
|
195
|
+
backedUp: boolean;
|
|
196
|
+
transports: string[];
|
|
197
|
+
}
|
|
198
|
+
export interface PasskeyRegistrationResponse {
|
|
199
|
+
ok: boolean;
|
|
200
|
+
passkey: PasskeyInfo | undefined;
|
|
201
|
+
}
|
|
202
|
+
export interface ListPasskeysResponse {
|
|
203
|
+
items: PasskeyInfo[];
|
|
204
|
+
}
|
|
205
|
+
export interface DeletePasskeyResponse {
|
|
206
|
+
ok: boolean;
|
|
207
|
+
}
|
|
142
208
|
export interface RestoreLoginRequest {
|
|
143
209
|
/** email or username */
|
|
144
210
|
credentials: string;
|
|
@@ -186,6 +252,13 @@ export interface AuthServiceClient {
|
|
|
186
252
|
get2FaStatus(request: Get2faStatusRequest): Observable<TwoFactorStatusResponse>;
|
|
187
253
|
getProfile(request: GetProfileRequest): Observable<AuthUser>;
|
|
188
254
|
cleanupExpiredTotpSetups(request: Empty): Observable<Empty>;
|
|
255
|
+
resetUserTwoFactor(request: ResetUserTwoFactorRequest): Observable<ResetUserTwoFactorResponse>;
|
|
256
|
+
generatePasskeyRegistrationOptions(request: GeneratePasskeyRegistrationOptionsRequest): Observable<PasskeyOptionsResponse>;
|
|
257
|
+
verifyPasskeyRegistration(request: VerifyPasskeyRegistrationRequest): Observable<PasskeyRegistrationResponse>;
|
|
258
|
+
listPasskeys(request: ListPasskeysRequest): Observable<ListPasskeysResponse>;
|
|
259
|
+
deletePasskey(request: DeletePasskeyRequest): Observable<DeletePasskeyResponse>;
|
|
260
|
+
generatePasskeyAuthenticationOptions(request: GeneratePasskeyAuthenticationOptionsRequest): Observable<PasskeyOptionsResponse>;
|
|
261
|
+
verifyPasskeyAuthentication(request: VerifyPasskeyAuthenticationRequest): Observable<AuthResult>;
|
|
189
262
|
/**
|
|
190
263
|
* Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
191
264
|
* HMAC matches; LogoutAll wipes every row for the user.
|
|
@@ -222,6 +295,13 @@ export interface AuthServiceController {
|
|
|
222
295
|
get2FaStatus(request: Get2faStatusRequest): Promise<TwoFactorStatusResponse> | Observable<TwoFactorStatusResponse> | TwoFactorStatusResponse;
|
|
223
296
|
getProfile(request: GetProfileRequest): Promise<AuthUser> | Observable<AuthUser> | AuthUser;
|
|
224
297
|
cleanupExpiredTotpSetups(request: Empty): Promise<Empty> | Observable<Empty> | Empty;
|
|
298
|
+
resetUserTwoFactor(request: ResetUserTwoFactorRequest): Promise<ResetUserTwoFactorResponse> | Observable<ResetUserTwoFactorResponse> | ResetUserTwoFactorResponse;
|
|
299
|
+
generatePasskeyRegistrationOptions(request: GeneratePasskeyRegistrationOptionsRequest): Promise<PasskeyOptionsResponse> | Observable<PasskeyOptionsResponse> | PasskeyOptionsResponse;
|
|
300
|
+
verifyPasskeyRegistration(request: VerifyPasskeyRegistrationRequest): Promise<PasskeyRegistrationResponse> | Observable<PasskeyRegistrationResponse> | PasskeyRegistrationResponse;
|
|
301
|
+
listPasskeys(request: ListPasskeysRequest): Promise<ListPasskeysResponse> | Observable<ListPasskeysResponse> | ListPasskeysResponse;
|
|
302
|
+
deletePasskey(request: DeletePasskeyRequest): Promise<DeletePasskeyResponse> | Observable<DeletePasskeyResponse> | DeletePasskeyResponse;
|
|
303
|
+
generatePasskeyAuthenticationOptions(request: GeneratePasskeyAuthenticationOptionsRequest): Promise<PasskeyOptionsResponse> | Observable<PasskeyOptionsResponse> | PasskeyOptionsResponse;
|
|
304
|
+
verifyPasskeyAuthentication(request: VerifyPasskeyAuthenticationRequest): Promise<AuthResult> | Observable<AuthResult> | AuthResult;
|
|
225
305
|
/**
|
|
226
306
|
* Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
227
307
|
* HMAC matches; LogoutAll wipes every row for the user.
|
package/gen/auth.js
CHANGED
|
@@ -30,6 +30,13 @@ function AuthServiceControllerMethods() {
|
|
|
30
30
|
"get2FaStatus",
|
|
31
31
|
"getProfile",
|
|
32
32
|
"cleanupExpiredTotpSetups",
|
|
33
|
+
"resetUserTwoFactor",
|
|
34
|
+
"generatePasskeyRegistrationOptions",
|
|
35
|
+
"verifyPasskeyRegistration",
|
|
36
|
+
"listPasskeys",
|
|
37
|
+
"deletePasskey",
|
|
38
|
+
"generatePasskeyAuthenticationOptions",
|
|
39
|
+
"verifyPasskeyAuthentication",
|
|
33
40
|
"logoutCurrent",
|
|
34
41
|
"logoutAll",
|
|
35
42
|
"restoreLogin",
|
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,49 @@ 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
|
+
|
|
101
|
+
export interface GeneratePasskeyRegistrationOptionsRequest {
|
|
102
|
+
userId: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface VerifyPasskeyRegistrationRequest {
|
|
106
|
+
userId: string;
|
|
107
|
+
challengeId: string;
|
|
108
|
+
/** Raw JSON returned by @simplewebauthn/browser startRegistration(). */
|
|
109
|
+
responseJson: string;
|
|
110
|
+
name: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface ListPasskeysRequest {
|
|
114
|
+
userId: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface DeletePasskeyRequest {
|
|
118
|
+
userId: string;
|
|
119
|
+
passkeyId: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface GeneratePasskeyAuthenticationOptionsRequest {
|
|
123
|
+
/**
|
|
124
|
+
* Username or email. V1 requires an existing account identifier and does
|
|
125
|
+
* not implement passkey-first/account-discovery registration.
|
|
126
|
+
*/
|
|
127
|
+
credentials: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface VerifyPasskeyAuthenticationRequest {
|
|
131
|
+
challengeId: string;
|
|
132
|
+
/** Raw JSON returned by @simplewebauthn/browser startAuthentication(). */
|
|
133
|
+
responseJson: string;
|
|
134
|
+
userAgent: string;
|
|
135
|
+
ip: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
94
138
|
export interface AuthUser {
|
|
95
139
|
id: string;
|
|
96
140
|
username: string;
|
|
@@ -165,6 +209,41 @@ export interface LogoutResponse {
|
|
|
165
209
|
removed: number;
|
|
166
210
|
}
|
|
167
211
|
|
|
212
|
+
export interface ResetUserTwoFactorResponse {
|
|
213
|
+
ok: boolean;
|
|
214
|
+
previousType: TwoFactorType;
|
|
215
|
+
revokedSessions: number;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface PasskeyOptionsResponse {
|
|
219
|
+
/** PublicKeyCredentialCreationOptionsJSON or PublicKeyCredentialRequestOptionsJSON. */
|
|
220
|
+
optionsJson: string;
|
|
221
|
+
challengeId: string;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface PasskeyInfo {
|
|
225
|
+
id: string;
|
|
226
|
+
name: string;
|
|
227
|
+
createdAt: string;
|
|
228
|
+
lastUsedAt: string;
|
|
229
|
+
deviceType: string;
|
|
230
|
+
backedUp: boolean;
|
|
231
|
+
transports: string[];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface PasskeyRegistrationResponse {
|
|
235
|
+
ok: boolean;
|
|
236
|
+
passkey: PasskeyInfo | undefined;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export interface ListPasskeysResponse {
|
|
240
|
+
items: PasskeyInfo[];
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface DeletePasskeyResponse {
|
|
244
|
+
ok: boolean;
|
|
245
|
+
}
|
|
246
|
+
|
|
168
247
|
export interface RestoreLoginRequest {
|
|
169
248
|
/** email or username */
|
|
170
249
|
credentials: string;
|
|
@@ -227,6 +306,24 @@ export interface AuthServiceClient {
|
|
|
227
306
|
|
|
228
307
|
cleanupExpiredTotpSetups(request: Empty): Observable<Empty>;
|
|
229
308
|
|
|
309
|
+
resetUserTwoFactor(request: ResetUserTwoFactorRequest): Observable<ResetUserTwoFactorResponse>;
|
|
310
|
+
|
|
311
|
+
generatePasskeyRegistrationOptions(
|
|
312
|
+
request: GeneratePasskeyRegistrationOptionsRequest,
|
|
313
|
+
): Observable<PasskeyOptionsResponse>;
|
|
314
|
+
|
|
315
|
+
verifyPasskeyRegistration(request: VerifyPasskeyRegistrationRequest): Observable<PasskeyRegistrationResponse>;
|
|
316
|
+
|
|
317
|
+
listPasskeys(request: ListPasskeysRequest): Observable<ListPasskeysResponse>;
|
|
318
|
+
|
|
319
|
+
deletePasskey(request: DeletePasskeyRequest): Observable<DeletePasskeyResponse>;
|
|
320
|
+
|
|
321
|
+
generatePasskeyAuthenticationOptions(
|
|
322
|
+
request: GeneratePasskeyAuthenticationOptionsRequest,
|
|
323
|
+
): Observable<PasskeyOptionsResponse>;
|
|
324
|
+
|
|
325
|
+
verifyPasskeyAuthentication(request: VerifyPasskeyAuthenticationRequest): Observable<AuthResult>;
|
|
326
|
+
|
|
230
327
|
/**
|
|
231
328
|
* Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
232
329
|
* HMAC matches; LogoutAll wipes every row for the user.
|
|
@@ -282,6 +379,34 @@ export interface AuthServiceController {
|
|
|
282
379
|
|
|
283
380
|
cleanupExpiredTotpSetups(request: Empty): Promise<Empty> | Observable<Empty> | Empty;
|
|
284
381
|
|
|
382
|
+
resetUserTwoFactor(
|
|
383
|
+
request: ResetUserTwoFactorRequest,
|
|
384
|
+
): Promise<ResetUserTwoFactorResponse> | Observable<ResetUserTwoFactorResponse> | ResetUserTwoFactorResponse;
|
|
385
|
+
|
|
386
|
+
generatePasskeyRegistrationOptions(
|
|
387
|
+
request: GeneratePasskeyRegistrationOptionsRequest,
|
|
388
|
+
): Promise<PasskeyOptionsResponse> | Observable<PasskeyOptionsResponse> | PasskeyOptionsResponse;
|
|
389
|
+
|
|
390
|
+
verifyPasskeyRegistration(
|
|
391
|
+
request: VerifyPasskeyRegistrationRequest,
|
|
392
|
+
): Promise<PasskeyRegistrationResponse> | Observable<PasskeyRegistrationResponse> | PasskeyRegistrationResponse;
|
|
393
|
+
|
|
394
|
+
listPasskeys(
|
|
395
|
+
request: ListPasskeysRequest,
|
|
396
|
+
): Promise<ListPasskeysResponse> | Observable<ListPasskeysResponse> | ListPasskeysResponse;
|
|
397
|
+
|
|
398
|
+
deletePasskey(
|
|
399
|
+
request: DeletePasskeyRequest,
|
|
400
|
+
): Promise<DeletePasskeyResponse> | Observable<DeletePasskeyResponse> | DeletePasskeyResponse;
|
|
401
|
+
|
|
402
|
+
generatePasskeyAuthenticationOptions(
|
|
403
|
+
request: GeneratePasskeyAuthenticationOptionsRequest,
|
|
404
|
+
): Promise<PasskeyOptionsResponse> | Observable<PasskeyOptionsResponse> | PasskeyOptionsResponse;
|
|
405
|
+
|
|
406
|
+
verifyPasskeyAuthentication(
|
|
407
|
+
request: VerifyPasskeyAuthenticationRequest,
|
|
408
|
+
): Promise<AuthResult> | Observable<AuthResult> | AuthResult;
|
|
409
|
+
|
|
285
410
|
/**
|
|
286
411
|
* Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
287
412
|
* HMAC matches; LogoutAll wipes every row for the user.
|
|
@@ -321,6 +446,13 @@ export function AuthServiceControllerMethods() {
|
|
|
321
446
|
"get2FaStatus",
|
|
322
447
|
"getProfile",
|
|
323
448
|
"cleanupExpiredTotpSetups",
|
|
449
|
+
"resetUserTwoFactor",
|
|
450
|
+
"generatePasskeyRegistrationOptions",
|
|
451
|
+
"verifyPasskeyRegistration",
|
|
452
|
+
"listPasskeys",
|
|
453
|
+
"deletePasskey",
|
|
454
|
+
"generatePasskeyAuthenticationOptions",
|
|
455
|
+
"verifyPasskeyAuthentication",
|
|
324
456
|
"logoutCurrent",
|
|
325
457
|
"logoutAll",
|
|
326
458
|
"restoreLogin",
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -15,9 +15,16 @@ 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);
|
|
22
|
+
rpc GeneratePasskeyRegistrationOptions(GeneratePasskeyRegistrationOptionsRequest) returns (PasskeyOptionsResponse);
|
|
23
|
+
rpc VerifyPasskeyRegistration(VerifyPasskeyRegistrationRequest) returns (PasskeyRegistrationResponse);
|
|
24
|
+
rpc ListPasskeys(ListPasskeysRequest) returns (ListPasskeysResponse);
|
|
25
|
+
rpc DeletePasskey(DeletePasskeyRequest) returns (DeletePasskeyResponse);
|
|
26
|
+
rpc GeneratePasskeyAuthenticationOptions(GeneratePasskeyAuthenticationOptionsRequest) returns (PasskeyOptionsResponse);
|
|
27
|
+
rpc VerifyPasskeyAuthentication(VerifyPasskeyAuthenticationRequest) returns (AuthResult);
|
|
21
28
|
|
|
22
29
|
// Logout — kill refresh tokens. LogoutCurrent kills only the one whose
|
|
23
30
|
// HMAC matches; LogoutAll wipes every row for the user.
|
|
@@ -73,6 +80,7 @@ message CreateCodeRequest {
|
|
|
73
80
|
|
|
74
81
|
// type ∈ { twofa, twofa_activate, twofa_deactivate, reset, totp, totp_activate,
|
|
75
82
|
// totp_deactivate, backup, regenerate_backup, confirm }
|
|
83
|
+
// regenerate_backup expects a current TOTP code, not an existing backup code.
|
|
76
84
|
// new_password is only used by the 'reset' flow.
|
|
77
85
|
message VerifyCodeRequest {
|
|
78
86
|
string email = 1;
|
|
@@ -102,9 +110,50 @@ message Get2faStatusRequest {
|
|
|
102
110
|
string username = 1;
|
|
103
111
|
}
|
|
104
112
|
|
|
105
|
-
message GetProfileRequest {
|
|
106
|
-
string user_id = 1;
|
|
107
|
-
}
|
|
113
|
+
message GetProfileRequest {
|
|
114
|
+
string user_id = 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
message ResetUserTwoFactorRequest {
|
|
118
|
+
string target_user_id = 1;
|
|
119
|
+
string admin_id = 2;
|
|
120
|
+
string reason = 3;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message GeneratePasskeyRegistrationOptionsRequest {
|
|
124
|
+
string user_id = 1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
message VerifyPasskeyRegistrationRequest {
|
|
128
|
+
string user_id = 1;
|
|
129
|
+
string challenge_id = 2;
|
|
130
|
+
// Raw JSON returned by @simplewebauthn/browser startRegistration().
|
|
131
|
+
string response_json = 3;
|
|
132
|
+
string name = 4;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
message ListPasskeysRequest {
|
|
136
|
+
string user_id = 1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
message DeletePasskeyRequest {
|
|
140
|
+
string user_id = 1;
|
|
141
|
+
string passkey_id = 2;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
message GeneratePasskeyAuthenticationOptionsRequest {
|
|
145
|
+
// Username or email. V1 requires an existing account identifier and does
|
|
146
|
+
// not implement passkey-first/account-discovery registration.
|
|
147
|
+
string credentials = 1;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
message VerifyPasskeyAuthenticationRequest {
|
|
151
|
+
string challenge_id = 1;
|
|
152
|
+
// Raw JSON returned by @simplewebauthn/browser startAuthentication().
|
|
153
|
+
string response_json = 2;
|
|
154
|
+
string user_agent = 3;
|
|
155
|
+
string ip = 4;
|
|
156
|
+
}
|
|
108
157
|
|
|
109
158
|
// ---------------------------------------------------------------------------
|
|
110
159
|
// Responses
|
|
@@ -177,10 +226,45 @@ message LogoutAllRequest {
|
|
|
177
226
|
string refresh_token = 2;
|
|
178
227
|
}
|
|
179
228
|
|
|
180
|
-
message LogoutResponse {
|
|
181
|
-
bool ok = 1;
|
|
182
|
-
int32 removed = 2; // number of refresh-token rows deleted
|
|
183
|
-
}
|
|
229
|
+
message LogoutResponse {
|
|
230
|
+
bool ok = 1;
|
|
231
|
+
int32 removed = 2; // number of refresh-token rows deleted
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
message ResetUserTwoFactorResponse {
|
|
235
|
+
bool ok = 1;
|
|
236
|
+
TwoFactorType previous_type = 2;
|
|
237
|
+
int32 revoked_sessions = 3;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
message PasskeyOptionsResponse {
|
|
241
|
+
// PublicKeyCredentialCreationOptionsJSON or PublicKeyCredentialRequestOptionsJSON.
|
|
242
|
+
string options_json = 1;
|
|
243
|
+
string challenge_id = 2;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
message PasskeyInfo {
|
|
247
|
+
string id = 1;
|
|
248
|
+
string name = 2;
|
|
249
|
+
string created_at = 3;
|
|
250
|
+
string last_used_at = 4;
|
|
251
|
+
string device_type = 5;
|
|
252
|
+
bool backed_up = 6;
|
|
253
|
+
repeated string transports = 7;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
message PasskeyRegistrationResponse {
|
|
257
|
+
bool ok = 1;
|
|
258
|
+
PasskeyInfo passkey = 2;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
message ListPasskeysResponse {
|
|
262
|
+
repeated PasskeyInfo items = 1;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
message DeletePasskeyResponse {
|
|
266
|
+
bool ok = 1;
|
|
267
|
+
}
|
|
184
268
|
|
|
185
269
|
message RestoreLoginRequest {
|
|
186
270
|
string credentials = 1; // email or username
|