@structured-id/proto 0.9.0 → 0.11.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.
@@ -0,0 +1,190 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ import { SessionId } from "../ids/ids.js";
8
+ /**
9
+ * One generation of a native session's refresh credentials, delivered in
10
+ * `sid-native-credentials-bin` response metadata by a native ceremony
11
+ * completion, a refresh and a redelivery of that refresh. The client
12
+ * replaces its stored generation with this one as a whole: credentials of
13
+ * different generations are never mixed.
14
+ *
15
+ * @generated from protobuf message sid.v1.authn.NativeCredentialSet
16
+ */
17
+ export interface NativeCredentialSet {
18
+ /**
19
+ * The generation's refresh credentials, opaque bearer secrets of equal
20
+ * standing bound to the application key: any one of them, with a fresh
21
+ * proof by that key, refreshes the session once. Their number is the
22
+ * issuer's session policy (`native_refresh_generation_size`); a client
23
+ * accepts any count from 1 up to 16 and refuses a set outside it.
24
+ *
25
+ * @generated from protobuf field: repeated string refresh_credentials = 1
26
+ */
27
+ refreshCredentials: string[];
28
+ /**
29
+ * Seconds until these credentials expire, counted from the response.
30
+ * Never beyond the session's absolute end or a source deadline.
31
+ *
32
+ * @generated from protobuf field: int64 expires_in = 2
33
+ */
34
+ expiresIn: bigint;
35
+ /**
36
+ * Seconds after a refresh commits during which a retry of the same
37
+ * exchange with another credential of the presented generation receives
38
+ * this same set again (the issuer's `native_redelivery_window_seconds`).
39
+ * After it, the presented generation is retired.
40
+ *
41
+ * @generated from protobuf field: int64 redelivery_window = 3
42
+ */
43
+ redeliveryWindow: bigint;
44
+ }
45
+ /**
46
+ * The claims of a SID native proof (JWS header `typ: "sid-native+jwt"`,
47
+ * `jwk`: the application key's public JWK, `alg`: an asymmetric algorithm
48
+ * of RFC 9449 §4.2). Signature, key, `jti`, `htm`, `htu` and `iat` follow
49
+ * RFC 9449 §4.2 and §4.3: `htu` and `htm` name the request as the client
50
+ * actually addressed it (the issuer URL and gRPC method path for a direct
51
+ * gRPC call, the HTTP route for an HTTP call), and each `jti` is admitted
52
+ * once by the issuer. The SID claims below bind what standard DPoP does not
53
+ * (RFC 9449 §11.7): `ath` keeps its access-token meaning and is not used.
54
+ * This message documents the claim set; the proof is the JWS, not this
55
+ * message.
56
+ *
57
+ * @generated from protobuf message sid.v1.authn.NativeProofClaims
58
+ */
59
+ export interface NativeProofClaims {
60
+ /**
61
+ * RFC 9449 §4.2: unique identifier of this proof; a proof is used once.
62
+ *
63
+ * @generated from protobuf field: string jti = 1
64
+ */
65
+ jti: string;
66
+ /**
67
+ * RFC 9449 §4.2: the HTTP method of the request ("POST").
68
+ *
69
+ * @generated from protobuf field: string htm = 2
70
+ */
71
+ htm: string;
72
+ /**
73
+ * RFC 9449 §4.2: the request URI without query and fragment, as the
74
+ * client addressed it.
75
+ *
76
+ * @generated from protobuf field: string htu = 3
77
+ */
78
+ htu: string;
79
+ /**
80
+ * RFC 9449 §4.2: creation time, seconds since the epoch.
81
+ *
82
+ * @generated from protobuf field: int64 iat = 4
83
+ */
84
+ iat: bigint;
85
+ /**
86
+ * On RefreshNativeSession: base64url (no padding) SHA-256 of the
87
+ * presented refresh credential's ASCII form. A proof for one credential
88
+ * presents no other.
89
+ *
90
+ * @generated from protobuf field: string sid_rt = 5
91
+ */
92
+ sidRt: string;
93
+ /**
94
+ * On RefreshNativeSession: base64url (no padding) of the request's
95
+ * `exchange`. A retry of the same exchange keeps it under a new proof.
96
+ *
97
+ * @generated from protobuf field: string sid_ex = 6
98
+ */
99
+ sidEx: string;
100
+ /**
101
+ * On a ceremony completion: base64url (no padding) SHA-256 of the
102
+ * ceremony reference that completion echoes, as the completing method
103
+ * documents it (for OpaqueLoginFinish the 16 bytes of its `login_id`). Binds
104
+ * the application key to that one authenticated ceremony.
105
+ *
106
+ * @generated from protobuf field: string sid_cer = 7
107
+ */
108
+ sidCer: string;
109
+ }
110
+ /**
111
+ * Refresh a native session, or receive again the generation a lost response
112
+ * carried. Presented credential in `sid-native-refresh`, proof in
113
+ * `sid-native-proof`; the access token in `authorization` and the next
114
+ * generation in `sid-native-credentials-bin` response metadata.
115
+ *
116
+ * @generated from protobuf message sid.v1.authn.RefreshNativeSessionRequest
117
+ */
118
+ export interface RefreshNativeSessionRequest {
119
+ /**
120
+ * The logical exchange: 16 random bytes the client chooses for one refresh
121
+ * and keeps across its retries. Retrying an exchange within the
122
+ * redelivery window, with any credential of the generation it rotated and
123
+ * a fresh proof, answers the generation it committed; it grants no
124
+ * authority by itself.
125
+ *
126
+ * @generated from protobuf field: bytes exchange = 1
127
+ */
128
+ exchange: Uint8Array;
129
+ }
130
+ /**
131
+ * The refreshed session. Its credentials are in the response metadata.
132
+ *
133
+ * @generated from protobuf message sid.v1.authn.RefreshNativeSessionResponse
134
+ */
135
+ export interface RefreshNativeSessionResponse {
136
+ /**
137
+ * The refreshed session: the same session, never a new one. Not a
138
+ * credential.
139
+ *
140
+ * @generated from protobuf field: sid.v1.ids.SessionId session_id = 3
141
+ */
142
+ sessionId?: SessionId;
143
+ /**
144
+ * Seconds until the delivered access token expires.
145
+ *
146
+ * @generated from protobuf field: int64 expires_in = 2
147
+ */
148
+ expiresIn: bigint;
149
+ }
150
+ declare class NativeCredentialSet$Type extends MessageType<NativeCredentialSet> {
151
+ constructor();
152
+ create(value?: PartialMessage<NativeCredentialSet>): NativeCredentialSet;
153
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NativeCredentialSet): NativeCredentialSet;
154
+ internalBinaryWrite(message: NativeCredentialSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
155
+ }
156
+ /**
157
+ * @generated MessageType for protobuf message sid.v1.authn.NativeCredentialSet
158
+ */
159
+ export declare const NativeCredentialSet: NativeCredentialSet$Type;
160
+ declare class NativeProofClaims$Type extends MessageType<NativeProofClaims> {
161
+ constructor();
162
+ create(value?: PartialMessage<NativeProofClaims>): NativeProofClaims;
163
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NativeProofClaims): NativeProofClaims;
164
+ internalBinaryWrite(message: NativeProofClaims, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
165
+ }
166
+ /**
167
+ * @generated MessageType for protobuf message sid.v1.authn.NativeProofClaims
168
+ */
169
+ export declare const NativeProofClaims: NativeProofClaims$Type;
170
+ declare class RefreshNativeSessionRequest$Type extends MessageType<RefreshNativeSessionRequest> {
171
+ constructor();
172
+ create(value?: PartialMessage<RefreshNativeSessionRequest>): RefreshNativeSessionRequest;
173
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RefreshNativeSessionRequest): RefreshNativeSessionRequest;
174
+ internalBinaryWrite(message: RefreshNativeSessionRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
175
+ }
176
+ /**
177
+ * @generated MessageType for protobuf message sid.v1.authn.RefreshNativeSessionRequest
178
+ */
179
+ export declare const RefreshNativeSessionRequest: RefreshNativeSessionRequest$Type;
180
+ declare class RefreshNativeSessionResponse$Type extends MessageType<RefreshNativeSessionResponse> {
181
+ constructor();
182
+ create(value?: PartialMessage<RefreshNativeSessionResponse>): RefreshNativeSessionResponse;
183
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RefreshNativeSessionResponse): RefreshNativeSessionResponse;
184
+ internalBinaryWrite(message: RefreshNativeSessionResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
185
+ }
186
+ /**
187
+ * @generated MessageType for protobuf message sid.v1.authn.RefreshNativeSessionResponse
188
+ */
189
+ export declare const RefreshNativeSessionResponse: RefreshNativeSessionResponse$Type;
190
+ export {};
@@ -0,0 +1,265 @@
1
+ import { WireType } from "@protobuf-ts/runtime";
2
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
3
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
4
+ import { MessageType } from "@protobuf-ts/runtime";
5
+ import { SessionId } from "../ids/ids.js";
6
+ // @generated message type with reflection information, may provide speed optimized methods
7
+ class NativeCredentialSet$Type extends MessageType {
8
+ constructor() {
9
+ super("sid.v1.authn.NativeCredentialSet", [
10
+ { no: 1, name: "refresh_credentials", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
11
+ { no: 2, name: "expires_in", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
12
+ { no: 3, name: "redelivery_window", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
13
+ ]);
14
+ }
15
+ create(value) {
16
+ const message = globalThis.Object.create((this.messagePrototype));
17
+ message.refreshCredentials = [];
18
+ message.expiresIn = 0n;
19
+ message.redeliveryWindow = 0n;
20
+ if (value !== undefined)
21
+ reflectionMergePartial(this, message, value);
22
+ return message;
23
+ }
24
+ internalBinaryRead(reader, length, options, target) {
25
+ let message = target ?? this.create(), end = reader.pos + length;
26
+ while (reader.pos < end) {
27
+ let [fieldNo, wireType] = reader.tag();
28
+ switch (fieldNo) {
29
+ case /* repeated string refresh_credentials */ 1:
30
+ message.refreshCredentials.push(reader.string());
31
+ break;
32
+ case /* int64 expires_in */ 2:
33
+ message.expiresIn = reader.int64().toBigInt();
34
+ break;
35
+ case /* int64 redelivery_window */ 3:
36
+ message.redeliveryWindow = reader.int64().toBigInt();
37
+ break;
38
+ default:
39
+ let u = options.readUnknownField;
40
+ if (u === "throw")
41
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
42
+ let d = reader.skip(wireType);
43
+ if (u !== false)
44
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
45
+ }
46
+ }
47
+ return message;
48
+ }
49
+ internalBinaryWrite(message, writer, options) {
50
+ /* repeated string refresh_credentials = 1; */
51
+ for (let i = 0; i < message.refreshCredentials.length; i++)
52
+ writer.tag(1, WireType.LengthDelimited).string(message.refreshCredentials[i]);
53
+ /* int64 expires_in = 2; */
54
+ if (message.expiresIn !== 0n)
55
+ writer.tag(2, WireType.Varint).int64(message.expiresIn);
56
+ /* int64 redelivery_window = 3; */
57
+ if (message.redeliveryWindow !== 0n)
58
+ writer.tag(3, WireType.Varint).int64(message.redeliveryWindow);
59
+ let u = options.writeUnknownFields;
60
+ if (u !== false)
61
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
62
+ return writer;
63
+ }
64
+ }
65
+ /**
66
+ * @generated MessageType for protobuf message sid.v1.authn.NativeCredentialSet
67
+ */
68
+ export const NativeCredentialSet = new NativeCredentialSet$Type();
69
+ // @generated message type with reflection information, may provide speed optimized methods
70
+ class NativeProofClaims$Type extends MessageType {
71
+ constructor() {
72
+ super("sid.v1.authn.NativeProofClaims", [
73
+ { no: 1, name: "jti", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
74
+ { no: 2, name: "htm", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
75
+ { no: 3, name: "htu", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
76
+ { no: 4, name: "iat", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
77
+ { no: 5, name: "sid_rt", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
78
+ { no: 6, name: "sid_ex", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
79
+ { no: 7, name: "sid_cer", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
80
+ ]);
81
+ }
82
+ create(value) {
83
+ const message = globalThis.Object.create((this.messagePrototype));
84
+ message.jti = "";
85
+ message.htm = "";
86
+ message.htu = "";
87
+ message.iat = 0n;
88
+ message.sidRt = "";
89
+ message.sidEx = "";
90
+ message.sidCer = "";
91
+ if (value !== undefined)
92
+ reflectionMergePartial(this, message, value);
93
+ return message;
94
+ }
95
+ internalBinaryRead(reader, length, options, target) {
96
+ let message = target ?? this.create(), end = reader.pos + length;
97
+ while (reader.pos < end) {
98
+ let [fieldNo, wireType] = reader.tag();
99
+ switch (fieldNo) {
100
+ case /* string jti */ 1:
101
+ message.jti = reader.string();
102
+ break;
103
+ case /* string htm */ 2:
104
+ message.htm = reader.string();
105
+ break;
106
+ case /* string htu */ 3:
107
+ message.htu = reader.string();
108
+ break;
109
+ case /* int64 iat */ 4:
110
+ message.iat = reader.int64().toBigInt();
111
+ break;
112
+ case /* string sid_rt */ 5:
113
+ message.sidRt = reader.string();
114
+ break;
115
+ case /* string sid_ex */ 6:
116
+ message.sidEx = reader.string();
117
+ break;
118
+ case /* string sid_cer */ 7:
119
+ message.sidCer = reader.string();
120
+ break;
121
+ default:
122
+ let u = options.readUnknownField;
123
+ if (u === "throw")
124
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
125
+ let d = reader.skip(wireType);
126
+ if (u !== false)
127
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
128
+ }
129
+ }
130
+ return message;
131
+ }
132
+ internalBinaryWrite(message, writer, options) {
133
+ /* string jti = 1; */
134
+ if (message.jti !== "")
135
+ writer.tag(1, WireType.LengthDelimited).string(message.jti);
136
+ /* string htm = 2; */
137
+ if (message.htm !== "")
138
+ writer.tag(2, WireType.LengthDelimited).string(message.htm);
139
+ /* string htu = 3; */
140
+ if (message.htu !== "")
141
+ writer.tag(3, WireType.LengthDelimited).string(message.htu);
142
+ /* int64 iat = 4; */
143
+ if (message.iat !== 0n)
144
+ writer.tag(4, WireType.Varint).int64(message.iat);
145
+ /* string sid_rt = 5; */
146
+ if (message.sidRt !== "")
147
+ writer.tag(5, WireType.LengthDelimited).string(message.sidRt);
148
+ /* string sid_ex = 6; */
149
+ if (message.sidEx !== "")
150
+ writer.tag(6, WireType.LengthDelimited).string(message.sidEx);
151
+ /* string sid_cer = 7; */
152
+ if (message.sidCer !== "")
153
+ writer.tag(7, WireType.LengthDelimited).string(message.sidCer);
154
+ let u = options.writeUnknownFields;
155
+ if (u !== false)
156
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
157
+ return writer;
158
+ }
159
+ }
160
+ /**
161
+ * @generated MessageType for protobuf message sid.v1.authn.NativeProofClaims
162
+ */
163
+ export const NativeProofClaims = new NativeProofClaims$Type();
164
+ // @generated message type with reflection information, may provide speed optimized methods
165
+ class RefreshNativeSessionRequest$Type extends MessageType {
166
+ constructor() {
167
+ super("sid.v1.authn.RefreshNativeSessionRequest", [
168
+ { no: 1, name: "exchange", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
169
+ ]);
170
+ }
171
+ create(value) {
172
+ const message = globalThis.Object.create((this.messagePrototype));
173
+ message.exchange = new Uint8Array(0);
174
+ if (value !== undefined)
175
+ reflectionMergePartial(this, message, value);
176
+ return message;
177
+ }
178
+ internalBinaryRead(reader, length, options, target) {
179
+ let message = target ?? this.create(), end = reader.pos + length;
180
+ while (reader.pos < end) {
181
+ let [fieldNo, wireType] = reader.tag();
182
+ switch (fieldNo) {
183
+ case /* bytes exchange */ 1:
184
+ message.exchange = reader.bytes();
185
+ break;
186
+ default:
187
+ let u = options.readUnknownField;
188
+ if (u === "throw")
189
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
190
+ let d = reader.skip(wireType);
191
+ if (u !== false)
192
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
193
+ }
194
+ }
195
+ return message;
196
+ }
197
+ internalBinaryWrite(message, writer, options) {
198
+ /* bytes exchange = 1; */
199
+ if (message.exchange.length)
200
+ writer.tag(1, WireType.LengthDelimited).bytes(message.exchange);
201
+ let u = options.writeUnknownFields;
202
+ if (u !== false)
203
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
204
+ return writer;
205
+ }
206
+ }
207
+ /**
208
+ * @generated MessageType for protobuf message sid.v1.authn.RefreshNativeSessionRequest
209
+ */
210
+ export const RefreshNativeSessionRequest = new RefreshNativeSessionRequest$Type();
211
+ // @generated message type with reflection information, may provide speed optimized methods
212
+ class RefreshNativeSessionResponse$Type extends MessageType {
213
+ constructor() {
214
+ super("sid.v1.authn.RefreshNativeSessionResponse", [
215
+ { no: 3, name: "session_id", kind: "message", T: () => SessionId },
216
+ { no: 2, name: "expires_in", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
217
+ ]);
218
+ }
219
+ create(value) {
220
+ const message = globalThis.Object.create((this.messagePrototype));
221
+ message.expiresIn = 0n;
222
+ if (value !== undefined)
223
+ reflectionMergePartial(this, message, value);
224
+ return message;
225
+ }
226
+ internalBinaryRead(reader, length, options, target) {
227
+ let message = target ?? this.create(), end = reader.pos + length;
228
+ while (reader.pos < end) {
229
+ let [fieldNo, wireType] = reader.tag();
230
+ switch (fieldNo) {
231
+ case /* sid.v1.ids.SessionId session_id */ 3:
232
+ message.sessionId = SessionId.internalBinaryRead(reader, reader.uint32(), options, message.sessionId);
233
+ break;
234
+ case /* int64 expires_in */ 2:
235
+ message.expiresIn = reader.int64().toBigInt();
236
+ break;
237
+ default:
238
+ let u = options.readUnknownField;
239
+ if (u === "throw")
240
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
241
+ let d = reader.skip(wireType);
242
+ if (u !== false)
243
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
244
+ }
245
+ }
246
+ return message;
247
+ }
248
+ internalBinaryWrite(message, writer, options) {
249
+ /* int64 expires_in = 2; */
250
+ if (message.expiresIn !== 0n)
251
+ writer.tag(2, WireType.Varint).int64(message.expiresIn);
252
+ /* sid.v1.ids.SessionId session_id = 3; */
253
+ if (message.sessionId)
254
+ SessionId.internalBinaryWrite(message.sessionId, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
255
+ let u = options.writeUnknownFields;
256
+ if (u !== false)
257
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
258
+ return writer;
259
+ }
260
+ }
261
+ /**
262
+ * @generated MessageType for protobuf message sid.v1.authn.RefreshNativeSessionResponse
263
+ */
264
+ export const RefreshNativeSessionResponse = new RefreshNativeSessionResponse$Type();
265
+ //# sourceMappingURL=native_session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native_session.js","sourceRoot":"","sources":["../../../../../src/generated/sid/v1/authn/native_session.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA+I1C,2FAA2F;AAC3F,MAAM,wBAAyB,SAAQ,WAAgC;IACnE;QACI,KAAK,CAAC,kCAAkC,EAAE;YACtC,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,uBAAuB,EAAE,CAAC,EAAE,CAAC,CAAC,qBAAqB,EAAE;YACrH,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,oBAAoB,EAAE,CAAC,EAAE,CAAC,CAAC,mBAAmB,EAAE;YAClG,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,oBAAoB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C,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AACD;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,iCAAiC,EAAE,CAAC","sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies,ts_nocheck\n// @generated from protobuf file \"sid/v1/authn/native_session.proto\" (package \"sid.v1.authn\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\nimport { SessionId } from \"../ids/ids.js\";\n/**\n * One generation of a native session's refresh credentials, delivered in\n * `sid-native-credentials-bin` response metadata by a native ceremony\n * completion, a refresh and a redelivery of that refresh. The client\n * replaces its stored generation with this one as a whole: credentials of\n * different generations are never mixed.\n *\n * @generated from protobuf message sid.v1.authn.NativeCredentialSet\n */\nexport interface NativeCredentialSet {\n /**\n * The generation's refresh credentials, opaque bearer secrets of equal\n * standing bound to the application key: any one of them, with a fresh\n * proof by that key, refreshes the session once. Their number is the\n * issuer's session policy (`native_refresh_generation_size`); a client\n * accepts any count from 1 up to 16 and refuses a set outside it.\n *\n * @generated from protobuf field: repeated string refresh_credentials = 1\n */\n refreshCredentials: string[];\n /**\n * Seconds until these credentials expire, counted from the response.\n * Never beyond the session's absolute end or a source deadline.\n *\n * @generated from protobuf field: int64 expires_in = 2\n */\n expiresIn: bigint;\n /**\n * Seconds after a refresh commits during which a retry of the same\n * exchange with another credential of the presented generation receives\n * this same set again (the issuer's `native_redelivery_window_seconds`).\n * After it, the presented generation is retired.\n *\n * @generated from protobuf field: int64 redelivery_window = 3\n */\n redeliveryWindow: bigint;\n}\n/**\n * The claims of a SID native proof (JWS header `typ: \"sid-native+jwt\"`,\n * `jwk`: the application key's public JWK, `alg`: an asymmetric algorithm\n * of RFC 9449 §4.2). Signature, key, `jti`, `htm`, `htu` and `iat` follow\n * RFC 9449 §4.2 and §4.3: `htu` and `htm` name the request as the client\n * actually addressed it (the issuer URL and gRPC method path for a direct\n * gRPC call, the HTTP route for an HTTP call), and each `jti` is admitted\n * once by the issuer. The SID claims below bind what standard DPoP does not\n * (RFC 9449 §11.7): `ath` keeps its access-token meaning and is not used.\n * This message documents the claim set; the proof is the JWS, not this\n * message.\n *\n * @generated from protobuf message sid.v1.authn.NativeProofClaims\n */\nexport interface NativeProofClaims {\n /**\n * RFC 9449 §4.2: unique identifier of this proof; a proof is used once.\n *\n * @generated from protobuf field: string jti = 1\n */\n jti: string;\n /**\n * RFC 9449 §4.2: the HTTP method of the request (\"POST\").\n *\n * @generated from protobuf field: string htm = 2\n */\n htm: string;\n /**\n * RFC 9449 §4.2: the request URI without query and fragment, as the\n * client addressed it.\n *\n * @generated from protobuf field: string htu = 3\n */\n htu: string;\n /**\n * RFC 9449 §4.2: creation time, seconds since the epoch.\n *\n * @generated from protobuf field: int64 iat = 4\n */\n iat: bigint;\n /**\n * On RefreshNativeSession: base64url (no padding) SHA-256 of the\n * presented refresh credential's ASCII form. A proof for one credential\n * presents no other.\n *\n * @generated from protobuf field: string sid_rt = 5\n */\n sidRt: string;\n /**\n * On RefreshNativeSession: base64url (no padding) of the request's\n * `exchange`. A retry of the same exchange keeps it under a new proof.\n *\n * @generated from protobuf field: string sid_ex = 6\n */\n sidEx: string;\n /**\n * On a ceremony completion: base64url (no padding) SHA-256 of the\n * ceremony reference that completion echoes, as the completing method\n * documents it (for OpaqueLoginFinish the 16 bytes of its `login_id`). Binds\n * the application key to that one authenticated ceremony.\n *\n * @generated from protobuf field: string sid_cer = 7\n */\n sidCer: string;\n}\n/**\n * Refresh a native session, or receive again the generation a lost response\n * carried. Presented credential in `sid-native-refresh`, proof in\n * `sid-native-proof`; the access token in `authorization` and the next\n * generation in `sid-native-credentials-bin` response metadata.\n *\n * @generated from protobuf message sid.v1.authn.RefreshNativeSessionRequest\n */\nexport interface RefreshNativeSessionRequest {\n /**\n * The logical exchange: 16 random bytes the client chooses for one refresh\n * and keeps across its retries. Retrying an exchange within the\n * redelivery window, with any credential of the generation it rotated and\n * a fresh proof, answers the generation it committed; it grants no\n * authority by itself.\n *\n * @generated from protobuf field: bytes exchange = 1\n */\n exchange: Uint8Array;\n}\n/**\n * The refreshed session. Its credentials are in the response metadata.\n *\n * @generated from protobuf message sid.v1.authn.RefreshNativeSessionResponse\n */\nexport interface RefreshNativeSessionResponse {\n /**\n * The refreshed session: the same session, never a new one. Not a\n * credential.\n *\n * @generated from protobuf field: sid.v1.ids.SessionId session_id = 3\n */\n sessionId?: SessionId;\n /**\n * Seconds until the delivered access token expires.\n *\n * @generated from protobuf field: int64 expires_in = 2\n */\n expiresIn: bigint;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass NativeCredentialSet$Type extends MessageType<NativeCredentialSet> {\n constructor() {\n super(\"sid.v1.authn.NativeCredentialSet\", [\n { no: 1, name: \"refresh_credentials\", kind: \"scalar\", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },\n { no: 2, name: \"expires_in\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },\n { no: 3, name: \"redelivery_window\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }\n ]);\n }\n create(value?: PartialMessage<NativeCredentialSet>): NativeCredentialSet {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.refreshCredentials = [];\n message.expiresIn = 0n;\n message.redeliveryWindow = 0n;\n if (value !== undefined)\n reflectionMergePartial<NativeCredentialSet>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NativeCredentialSet): NativeCredentialSet {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* repeated string refresh_credentials */ 1:\n message.refreshCredentials.push(reader.string());\n break;\n case /* int64 expires_in */ 2:\n message.expiresIn = reader.int64().toBigInt();\n break;\n case /* int64 redelivery_window */ 3:\n message.redeliveryWindow = reader.int64().toBigInt();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: NativeCredentialSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* repeated string refresh_credentials = 1; */\n for (let i = 0; i < message.refreshCredentials.length; i++)\n writer.tag(1, WireType.LengthDelimited).string(message.refreshCredentials[i]);\n /* int64 expires_in = 2; */\n if (message.expiresIn !== 0n)\n writer.tag(2, WireType.Varint).int64(message.expiresIn);\n /* int64 redelivery_window = 3; */\n if (message.redeliveryWindow !== 0n)\n writer.tag(3, WireType.Varint).int64(message.redeliveryWindow);\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message sid.v1.authn.NativeCredentialSet\n */\nexport const NativeCredentialSet = new NativeCredentialSet$Type();\n// @generated message type with reflection information, may provide speed optimized methods\nclass NativeProofClaims$Type extends MessageType<NativeProofClaims> {\n constructor() {\n super(\"sid.v1.authn.NativeProofClaims\", [\n { no: 1, name: \"jti\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ },\n { no: 2, name: \"htm\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ },\n { no: 3, name: \"htu\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ },\n { no: 4, name: \"iat\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },\n { no: 5, name: \"sid_rt\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ },\n { no: 6, name: \"sid_ex\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ },\n { no: 7, name: \"sid_cer\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ }\n ]);\n }\n create(value?: PartialMessage<NativeProofClaims>): NativeProofClaims {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.jti = \"\";\n message.htm = \"\";\n message.htu = \"\";\n message.iat = 0n;\n message.sidRt = \"\";\n message.sidEx = \"\";\n message.sidCer = \"\";\n if (value !== undefined)\n reflectionMergePartial<NativeProofClaims>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NativeProofClaims): NativeProofClaims {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* string jti */ 1:\n message.jti = reader.string();\n break;\n case /* string htm */ 2:\n message.htm = reader.string();\n break;\n case /* string htu */ 3:\n message.htu = reader.string();\n break;\n case /* int64 iat */ 4:\n message.iat = reader.int64().toBigInt();\n break;\n case /* string sid_rt */ 5:\n message.sidRt = reader.string();\n break;\n case /* string sid_ex */ 6:\n message.sidEx = reader.string();\n break;\n case /* string sid_cer */ 7:\n message.sidCer = reader.string();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: NativeProofClaims, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* string jti = 1; */\n if (message.jti !== \"\")\n writer.tag(1, WireType.LengthDelimited).string(message.jti);\n /* string htm = 2; */\n if (message.htm !== \"\")\n writer.tag(2, WireType.LengthDelimited).string(message.htm);\n /* string htu = 3; */\n if (message.htu !== \"\")\n writer.tag(3, WireType.LengthDelimited).string(message.htu);\n /* int64 iat = 4; */\n if (message.iat !== 0n)\n writer.tag(4, WireType.Varint).int64(message.iat);\n /* string sid_rt = 5; */\n if (message.sidRt !== \"\")\n writer.tag(5, WireType.LengthDelimited).string(message.sidRt);\n /* string sid_ex = 6; */\n if (message.sidEx !== \"\")\n writer.tag(6, WireType.LengthDelimited).string(message.sidEx);\n /* string sid_cer = 7; */\n if (message.sidCer !== \"\")\n writer.tag(7, WireType.LengthDelimited).string(message.sidCer);\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message sid.v1.authn.NativeProofClaims\n */\nexport const NativeProofClaims = new NativeProofClaims$Type();\n// @generated message type with reflection information, may provide speed optimized methods\nclass RefreshNativeSessionRequest$Type extends MessageType<RefreshNativeSessionRequest> {\n constructor() {\n super(\"sid.v1.authn.RefreshNativeSessionRequest\", [\n { no: 1, name: \"exchange\", kind: \"scalar\", T: 12 /*ScalarType.BYTES*/ }\n ]);\n }\n create(value?: PartialMessage<RefreshNativeSessionRequest>): RefreshNativeSessionRequest {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.exchange = new Uint8Array(0);\n if (value !== undefined)\n reflectionMergePartial<RefreshNativeSessionRequest>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RefreshNativeSessionRequest): RefreshNativeSessionRequest {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* bytes exchange */ 1:\n message.exchange = reader.bytes();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: RefreshNativeSessionRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* bytes exchange = 1; */\n if (message.exchange.length)\n writer.tag(1, WireType.LengthDelimited).bytes(message.exchange);\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message sid.v1.authn.RefreshNativeSessionRequest\n */\nexport const RefreshNativeSessionRequest = new RefreshNativeSessionRequest$Type();\n// @generated message type with reflection information, may provide speed optimized methods\nclass RefreshNativeSessionResponse$Type extends MessageType<RefreshNativeSessionResponse> {\n constructor() {\n super(\"sid.v1.authn.RefreshNativeSessionResponse\", [\n { no: 3, name: \"session_id\", kind: \"message\", T: () => SessionId },\n { no: 2, name: \"expires_in\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }\n ]);\n }\n create(value?: PartialMessage<RefreshNativeSessionResponse>): RefreshNativeSessionResponse {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.expiresIn = 0n;\n if (value !== undefined)\n reflectionMergePartial<RefreshNativeSessionResponse>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RefreshNativeSessionResponse): RefreshNativeSessionResponse {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* sid.v1.ids.SessionId session_id */ 3:\n message.sessionId = SessionId.internalBinaryRead(reader, reader.uint32(), options, message.sessionId);\n break;\n case /* int64 expires_in */ 2:\n message.expiresIn = reader.int64().toBigInt();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: RefreshNativeSessionResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* int64 expires_in = 2; */\n if (message.expiresIn !== 0n)\n writer.tag(2, WireType.Varint).int64(message.expiresIn);\n /* sid.v1.ids.SessionId session_id = 3; */\n if (message.sessionId)\n SessionId.internalBinaryWrite(message.sessionId, writer.tag(3, WireType.LengthDelimited).fork(), options).join();\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message sid.v1.authn.RefreshNativeSessionResponse\n */\nexport const RefreshNativeSessionResponse = new RefreshNativeSessionResponse$Type();\n"]}
@@ -4,6 +4,22 @@ export declare const BindingId: MessageType<wire.BindingId>;
4
4
  export type BindingId = wire.BindingId;
5
5
  export declare const PasswordOperationId: MessageType<wire.PasswordOperationId>;
6
6
  export type PasswordOperationId = wire.PasswordOperationId;
7
+ export declare const OpaqueLoginId: MessageType<wire.OpaqueLoginId>;
8
+ export type OpaqueLoginId = wire.OpaqueLoginId;
9
+ export declare const SessionId: MessageType<wire.SessionId>;
10
+ export type SessionId = wire.SessionId;
11
+ export declare const CredentialId: MessageType<wire.CredentialId>;
12
+ export type CredentialId = wire.CredentialId;
13
+ export declare const OtpSessionId: MessageType<wire.OtpSessionId>;
14
+ export type OtpSessionId = wire.OtpSessionId;
15
+ export declare const MagicLinkId: MessageType<wire.MagicLinkId>;
16
+ export type MagicLinkId = wire.MagicLinkId;
17
+ export declare const StepUpChallengeId: MessageType<wire.StepUpChallengeId>;
18
+ export type StepUpChallengeId = wire.StepUpChallengeId;
19
+ export declare const ResetSessionId: MessageType<wire.ResetSessionId>;
20
+ export type ResetSessionId = wire.ResetSessionId;
21
+ export declare const ImportedPasswordUpgradeId: MessageType<wire.ImportedPasswordUpgradeId>;
22
+ export type ImportedPasswordUpgradeId = wire.ImportedPasswordUpgradeId;
7
23
  export declare const MachineUserId: MessageType<wire.MachineUserId>;
8
24
  export type MachineUserId = wire.MachineUserId;
9
25
  export declare const ProvisioningConnectorId: MessageType<wire.ProvisioningConnectorId>;
@@ -1,6 +1,14 @@
1
1
  import { wire } from "@structured-id/ids";
2
2
  export const BindingId = wire.BindingId;
3
3
  export const PasswordOperationId = wire.PasswordOperationId;
4
+ export const OpaqueLoginId = wire.OpaqueLoginId;
5
+ export const SessionId = wire.SessionId;
6
+ export const CredentialId = wire.CredentialId;
7
+ export const OtpSessionId = wire.OtpSessionId;
8
+ export const MagicLinkId = wire.MagicLinkId;
9
+ export const StepUpChallengeId = wire.StepUpChallengeId;
10
+ export const ResetSessionId = wire.ResetSessionId;
11
+ export const ImportedPasswordUpgradeId = wire.ImportedPasswordUpgradeId;
4
12
  export const MachineUserId = wire.MachineUserId;
5
13
  export const ProvisioningConnectorId = wire.ProvisioningConnectorId;
6
14
  export const ResourceId = wire.ResourceId;
@@ -1 +1 @@
1
- {"version":3,"file":"ids.js","sourceRoot":"","sources":["../../../../../src/generated/sid/v1/ids/ids.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,MAAM,SAAS,GAAgC,IAAI,CAAC,SAAS,CAAC;AAErE,MAAM,CAAC,MAAM,mBAAmB,GAA0C,IAAI,CAAC,mBAAmB,CAAC;AAEnG,MAAM,CAAC,MAAM,aAAa,GAAoC,IAAI,CAAC,aAAa,CAAC;AAEjF,MAAM,CAAC,MAAM,uBAAuB,GAA8C,IAAI,CAAC,uBAAuB,CAAC;AAE/G,MAAM,CAAC,MAAM,UAAU,GAAiC,IAAI,CAAC,UAAU,CAAC;AAExE,MAAM,CAAC,MAAM,wBAAwB,GAA+C,IAAI,CAAC,wBAAwB,CAAC","sourcesContent":["// The sid.v1.ids messages are owned by @structured-id/ids; this module\n// re-exports its objects so generated messages that carry an identifier\n// share them instead of a second generated copy.\nimport type { MessageType } from \"@protobuf-ts/runtime\";\nimport { wire } from \"@structured-id/ids\";\n\nexport const BindingId: MessageType<wire.BindingId> = wire.BindingId;\nexport type BindingId = wire.BindingId;\nexport const PasswordOperationId: MessageType<wire.PasswordOperationId> = wire.PasswordOperationId;\nexport type PasswordOperationId = wire.PasswordOperationId;\nexport const MachineUserId: MessageType<wire.MachineUserId> = wire.MachineUserId;\nexport type MachineUserId = wire.MachineUserId;\nexport const ProvisioningConnectorId: MessageType<wire.ProvisioningConnectorId> = wire.ProvisioningConnectorId;\nexport type ProvisioningConnectorId = wire.ProvisioningConnectorId;\nexport const ResourceId: MessageType<wire.ResourceId> = wire.ResourceId;\nexport type ResourceId = wire.ResourceId;\nexport const ProvisioningCredentialId: MessageType<wire.ProvisioningCredentialId> = wire.ProvisioningCredentialId;\nexport type ProvisioningCredentialId = wire.ProvisioningCredentialId;\n"]}
1
+ {"version":3,"file":"ids.js","sourceRoot":"","sources":["../../../../../src/generated/sid/v1/ids/ids.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,MAAM,SAAS,GAAgC,IAAI,CAAC,SAAS,CAAC;AAErE,MAAM,CAAC,MAAM,mBAAmB,GAA0C,IAAI,CAAC,mBAAmB,CAAC;AAEnG,MAAM,CAAC,MAAM,aAAa,GAAoC,IAAI,CAAC,aAAa,CAAC;AAEjF,MAAM,CAAC,MAAM,SAAS,GAAgC,IAAI,CAAC,SAAS,CAAC;AAErE,MAAM,CAAC,MAAM,YAAY,GAAmC,IAAI,CAAC,YAAY,CAAC;AAE9E,MAAM,CAAC,MAAM,YAAY,GAAmC,IAAI,CAAC,YAAY,CAAC;AAE9E,MAAM,CAAC,MAAM,WAAW,GAAkC,IAAI,CAAC,WAAW,CAAC;AAE3E,MAAM,CAAC,MAAM,iBAAiB,GAAwC,IAAI,CAAC,iBAAiB,CAAC;AAE7F,MAAM,CAAC,MAAM,cAAc,GAAqC,IAAI,CAAC,cAAc,CAAC;AAEpF,MAAM,CAAC,MAAM,yBAAyB,GAAgD,IAAI,CAAC,yBAAyB,CAAC;AAErH,MAAM,CAAC,MAAM,aAAa,GAAoC,IAAI,CAAC,aAAa,CAAC;AAEjF,MAAM,CAAC,MAAM,uBAAuB,GAA8C,IAAI,CAAC,uBAAuB,CAAC;AAE/G,MAAM,CAAC,MAAM,UAAU,GAAiC,IAAI,CAAC,UAAU,CAAC;AAExE,MAAM,CAAC,MAAM,wBAAwB,GAA+C,IAAI,CAAC,wBAAwB,CAAC","sourcesContent":["// The sid.v1.ids messages are owned by @structured-id/ids; this module\n// re-exports its objects so generated messages that carry an identifier\n// share them instead of a second generated copy.\nimport type { MessageType } from \"@protobuf-ts/runtime\";\nimport { wire } from \"@structured-id/ids\";\n\nexport const BindingId: MessageType<wire.BindingId> = wire.BindingId;\nexport type BindingId = wire.BindingId;\nexport const PasswordOperationId: MessageType<wire.PasswordOperationId> = wire.PasswordOperationId;\nexport type PasswordOperationId = wire.PasswordOperationId;\nexport const OpaqueLoginId: MessageType<wire.OpaqueLoginId> = wire.OpaqueLoginId;\nexport type OpaqueLoginId = wire.OpaqueLoginId;\nexport const SessionId: MessageType<wire.SessionId> = wire.SessionId;\nexport type SessionId = wire.SessionId;\nexport const CredentialId: MessageType<wire.CredentialId> = wire.CredentialId;\nexport type CredentialId = wire.CredentialId;\nexport const OtpSessionId: MessageType<wire.OtpSessionId> = wire.OtpSessionId;\nexport type OtpSessionId = wire.OtpSessionId;\nexport const MagicLinkId: MessageType<wire.MagicLinkId> = wire.MagicLinkId;\nexport type MagicLinkId = wire.MagicLinkId;\nexport const StepUpChallengeId: MessageType<wire.StepUpChallengeId> = wire.StepUpChallengeId;\nexport type StepUpChallengeId = wire.StepUpChallengeId;\nexport const ResetSessionId: MessageType<wire.ResetSessionId> = wire.ResetSessionId;\nexport type ResetSessionId = wire.ResetSessionId;\nexport const ImportedPasswordUpgradeId: MessageType<wire.ImportedPasswordUpgradeId> = wire.ImportedPasswordUpgradeId;\nexport type ImportedPasswordUpgradeId = wire.ImportedPasswordUpgradeId;\nexport const MachineUserId: MessageType<wire.MachineUserId> = wire.MachineUserId;\nexport type MachineUserId = wire.MachineUserId;\nexport const ProvisioningConnectorId: MessageType<wire.ProvisioningConnectorId> = wire.ProvisioningConnectorId;\nexport type ProvisioningConnectorId = wire.ProvisioningConnectorId;\nexport const ResourceId: MessageType<wire.ResourceId> = wire.ResourceId;\nexport type ResourceId = wire.ResourceId;\nexport const ProvisioningCredentialId: MessageType<wire.ProvisioningCredentialId> = wire.ProvisioningCredentialId;\nexport type ProvisioningCredentialId = wire.ProvisioningCredentialId;\n"]}
package/dist/totp.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Presentation of a TOTP enrollment. The server sends the raw shared secret
3
+ * and its parameters (`TotpEnrollmentChallenge`); an authenticator app takes
4
+ * the Base32 secret typed in, or the `otpauth://totp` URI behind a QR code.
5
+ */
6
+ import { type TotpEnrollmentChallenge } from "./generated/sid/v1/authn/auth.js";
7
+ /** `bytes` in Base32 (RFC 4648 §6), without padding. */
8
+ export declare function base32(bytes: Uint8Array): string;
9
+ /**
10
+ * The `otpauth://totp/<issuer>:<account>` URI of `challenge` (Key URI
11
+ * Format), with issuer and account percent-encoded so neither can split the
12
+ * label or add a parameter. Throws when the challenge lacks the secret or a
13
+ * parameter the app needs (a guess would enroll codes the server refuses),
14
+ * or when issuer or account holds the colon the label separates them with.
15
+ */
16
+ export declare function otpauthUri(challenge: TotpEnrollmentChallenge): string;