Skip to content

Commit 6b04648

Browse files
committed
chore: format
1 parent 38cc877 commit 6b04648

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

src/auth/backchannel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export class Backchannel extends BaseAuthAPI implements IBackchannel {
211211
headers: { "Content-Type": "application/x-www-form-urlencoded" },
212212
body: new URLSearchParams(body),
213213
},
214-
{}
214+
{},
215215
);
216216

217217
const r: JSONApiResponse<AuthorizeResponse> = await JSONApiResponse.fromResponse(response);
@@ -266,7 +266,7 @@ export class Backchannel extends BaseAuthAPI implements IBackchannel {
266266
headers: { "Content-Type": "application/x-www-form-urlencoded" },
267267
body: new URLSearchParams(body),
268268
},
269-
{}
269+
{},
270270
);
271271

272272
const r: JSONApiResponse<TokenResponse> = await JSONApiResponse.fromResponse(response);

tests/auth/backchannel.test.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe("Backchannel", () => {
4040
});
4141

4242
await expect(backchannel.authorize({} as AuthorizeOptions)).rejects.toThrow(
43-
'login_hint parameter validation failed: "sub" contains unsupported format'
43+
'login_hint parameter validation failed: "sub" contains unsupported format',
4444
);
4545
});
4646

@@ -51,7 +51,7 @@ describe("Backchannel", () => {
5151
});
5252

5353
await expect(backchannel.authorize({ userId: "auth0|test-user-id" } as AuthorizeOptions)).rejects.toThrow(
54-
"binding_message is required"
54+
"binding_message is required",
5555
);
5656
});
5757

@@ -66,7 +66,7 @@ describe("Backchannel", () => {
6666
userId: "auth0|test-user-id",
6767
binding_message: "Test binding message",
6868
scope: "invalid_scope",
69-
} as AuthorizeOptions)
69+
} as AuthorizeOptions),
7070
).rejects.toThrow("openid scope must be requested");
7171
});
7272

@@ -82,7 +82,7 @@ describe("Backchannel", () => {
8282
userId: "auth0|test-user-id",
8383
binding_message: "Test binding message",
8484
scope: "openid",
85-
})
85+
}),
8686
).resolves.toMatchObject({
8787
auth_req_id: "test-auth-req-id",
8888
expires_in: 300,
@@ -96,7 +96,7 @@ describe("Backchannel", () => {
9696
.post("/bc-authorize")
9797
.reply(201, (uri, requestBody, cb) => {
9898
receivedRequestedExpiry = JSON.parse(
99-
querystring.parse(requestBody as any)["requested_expiry"] as string
99+
querystring.parse(requestBody as any)["requested_expiry"] as string,
100100
);
101101
cb(null, {
102102
auth_req_id: "test-auth-req-id",
@@ -122,10 +122,10 @@ describe("Backchannel", () => {
122122
.post("/bc-authorize")
123123
.reply(201, (uri, requestBody, cb) => {
124124
receivedRequestedExpiry = JSON.parse(
125-
querystring.parse(requestBody as any)["requested_expiry"] as string
125+
querystring.parse(requestBody as any)["requested_expiry"] as string,
126126
);
127127
receivedRequestExpiry = JSON.parse(
128-
querystring.parse(requestBody as any)["request_expiry"] as string
128+
querystring.parse(requestBody as any)["request_expiry"] as string,
129129
);
130130
cb(null, {
131131
auth_req_id: "test-auth-req-id",
@@ -151,7 +151,7 @@ describe("Backchannel", () => {
151151
.post("/bc-authorize")
152152
.reply(201, (uri, requestBody, cb) => {
153153
receivedAuthorizationDetails = JSON.parse(
154-
querystring.parse(requestBody as any)["authorization_details"] as string
154+
querystring.parse(requestBody as any)["authorization_details"] as string,
155155
);
156156
cb(null, {
157157
auth_req_id: "test-auth-req-id",
@@ -204,11 +204,11 @@ describe("Backchannel", () => {
204204
userId: "auth0|test-user-id",
205205
binding_message: "Test binding message",
206206
scope: "openid",
207-
})
207+
}),
208208
).rejects.toThrowError(
209209
expect.objectContaining({
210210
body: expect.anything(),
211-
})
211+
}),
212212
);
213213
});
214214

@@ -226,7 +226,7 @@ describe("Backchannel", () => {
226226
userId: "auth0|test-user-id",
227227
binding_message: "Test binding message",
228228
scope: "openid",
229-
})
229+
}),
230230
).resolves.toMatchObject({
231231
auth_req_id: "test-auth-req-id",
232232
expires_in: 300,
@@ -248,7 +248,7 @@ describe("Backchannel", () => {
248248
userId: "auth0|test-user-id",
249249
binding_message: "Test binding message",
250250
scope: "openid",
251-
})
251+
}),
252252
).resolves.toMatchObject({
253253
auth_req_id: "test-auth-req-id",
254254
expires_in: 300,
@@ -267,7 +267,7 @@ describe("Backchannel", () => {
267267
await expect(
268268
backchannel.backchannelGrant({
269269
auth_req_id: "invalid-auth-req-id",
270-
})
270+
}),
271271
).rejects.toThrow("Invalid or expired auth_req_id");
272272
});
273273

@@ -282,7 +282,7 @@ describe("Backchannel", () => {
282282
await expect(
283283
backchannel.backchannelGrant({
284284
auth_req_id: "test-auth-req-id",
285-
})
285+
}),
286286
).resolves.toMatchObject({
287287
access_token: "test-access-token",
288288
id_token: "test-id-token",
@@ -304,7 +304,7 @@ describe("Backchannel", () => {
304304
await expect(
305305
backchannel.backchannelGrant({
306306
auth_req_id: "test-auth-req-id",
307-
})
307+
}),
308308
).resolves.toMatchObject({
309309
access_token: "test-access-token",
310310
id_token: "test-id-token",
@@ -323,11 +323,11 @@ describe("Backchannel", () => {
323323
await expect(
324324
backchannel.backchannelGrant({
325325
auth_req_id: "test-auth-req-id",
326-
})
326+
}),
327327
).rejects.toThrowError(
328328
expect.objectContaining({
329329
body: expect.anything(),
330-
})
330+
}),
331331
);
332332
});
333333

@@ -340,11 +340,11 @@ describe("Backchannel", () => {
340340
await expect(
341341
backchannel.backchannelGrant({
342342
auth_req_id: "test-auth-req-id",
343-
})
343+
}),
344344
).rejects.toThrowError(
345345
expect.objectContaining({
346346
body: expect.anything(),
347-
})
347+
}),
348348
);
349349
});
350350

@@ -357,11 +357,11 @@ describe("Backchannel", () => {
357357
await expect(
358358
backchannel.backchannelGrant({
359359
auth_req_id: "test-auth-req-id",
360-
})
360+
}),
361361
).rejects.toThrowError(
362362
expect.objectContaining({
363363
body: expect.anything(),
364-
})
364+
}),
365365
);
366366
});
367367

@@ -378,7 +378,7 @@ describe("Backchannel", () => {
378378
await expect(
379379
jwtBackchannel.backchannelGrant({
380380
auth_req_id: "test-auth-req-id",
381-
})
381+
}),
382382
).resolves.toMatchObject({
383383
access_token: "test-access-token",
384384
id_token: "test-id-token",
@@ -400,7 +400,7 @@ describe("Backchannel", () => {
400400
await expect(
401401
mtlsBackchannel.backchannelGrant({
402402
auth_req_id: "test-auth-req-id",
403-
})
403+
}),
404404
).resolves.toMatchObject({
405405
access_token: "test-access-token",
406406
id_token: "test-id-token",

0 commit comments

Comments
 (0)