@faable/auth-sdk 2.7.57 → 2.7.59

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.
@@ -4743,6 +4743,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
4743
4743
  status: "active" | "revoked";
4744
4744
  ip?: string | undefined;
4745
4745
  user_agent?: string | undefined;
4746
+ device_name?: string | undefined;
4746
4747
  client?: unknown;
4747
4748
  connection?: unknown;
4748
4749
  issuer?: string | undefined;
@@ -4782,6 +4783,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
4782
4783
  status: "active" | "revoked";
4783
4784
  ip?: string | undefined;
4784
4785
  user_agent?: string | undefined;
4786
+ device_name?: string | undefined;
4785
4787
  client?: unknown;
4786
4788
  connection?: unknown;
4787
4789
  issuer?: string | undefined;
@@ -4803,6 +4805,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
4803
4805
  status: "active" | "revoked";
4804
4806
  ip?: string | undefined;
4805
4807
  user_agent?: string | undefined;
4808
+ device_name?: string | undefined;
4806
4809
  client?: unknown;
4807
4810
  connection?: unknown;
4808
4811
  issuer?: string | undefined;
@@ -4827,6 +4830,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
4827
4830
  status: "active" | "revoked";
4828
4831
  ip?: string | undefined;
4829
4832
  user_agent?: string | undefined;
4833
+ device_name?: string | undefined;
4830
4834
  client?: unknown;
4831
4835
  connection?: unknown;
4832
4836
  issuer?: string | undefined;
@@ -4867,6 +4871,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
4867
4871
  status: "active" | "revoked";
4868
4872
  ip?: string | undefined;
4869
4873
  user_agent?: string | undefined;
4874
+ device_name?: string | undefined;
4870
4875
  client?: unknown;
4871
4876
  connection?: unknown;
4872
4877
  issuer?: string | undefined;
@@ -4016,6 +4016,26 @@ export interface paths {
4016
4016
  patch?: never;
4017
4017
  trace?: never;
4018
4018
  };
4019
+ "/oauth/session-from-ticket": {
4020
+ parameters: {
4021
+ query?: never;
4022
+ header?: never;
4023
+ path?: never;
4024
+ cookie?: never;
4025
+ };
4026
+ /**
4027
+ * Open the hosted session from a ticket
4028
+ * @description Consumes a ticket from `POST /oauth/link_ticket`, establishes the cookie session for its user and redirects to `redirect_to`, a hosted screen of this host. For Relying Parties that signed the user in with a direct grant (e.g. passwordless OTP) and so hold no cookie session, when they send the user to an account screen such as `/flow/account/security`.
4029
+ */
4030
+ get: operations["oauth/sessionFromTicket"];
4031
+ put?: never;
4032
+ post?: never;
4033
+ delete?: never;
4034
+ options?: never;
4035
+ head?: never;
4036
+ patch?: never;
4037
+ trace?: never;
4038
+ };
4019
4039
  "/oauth/token": {
4020
4040
  parameters: {
4021
4041
  query?: never;
@@ -6225,6 +6245,8 @@ export interface components {
6225
6245
  ip?: string;
6226
6246
  /** @description Raw `User-Agent` header at the last authentication. */
6227
6247
  user_agent?: string;
6248
+ /** @description The name a device gave itself when it asked for a code (device authorization grant), e.g. the hostname `faable login` runs on. Absent for browser sessions: a browser does not expose one. */
6249
+ device_name?: string;
6228
6250
  client?: components["schemas"]["Client"] | string | unknown;
6229
6251
  connection?: components["schemas"]["Connection"] | string | unknown;
6230
6252
  /** @description Issuer URL the session was minted on. */
@@ -24420,6 +24442,8 @@ export interface operations {
24420
24442
  ip?: string;
24421
24443
  /** @description Raw `User-Agent` header at the last authentication. */
24422
24444
  user_agent?: string;
24445
+ /** @description The name a device gave itself when it asked for a code (device authorization grant), e.g. the hostname `faable login` runs on. Absent for browser sessions: a browser does not expose one. */
24446
+ device_name?: string;
24423
24447
  client?: components["schemas"]["Client"] | string | unknown;
24424
24448
  connection?: components["schemas"]["Connection"] | string | unknown;
24425
24449
  /** @description Issuer URL the session was minted on. */
@@ -24573,6 +24597,8 @@ export interface operations {
24573
24597
  ip?: string;
24574
24598
  /** @description Raw `User-Agent` header at the last authentication. */
24575
24599
  user_agent?: string;
24600
+ /** @description The name a device gave itself when it asked for a code (device authorization grant), e.g. the hostname `faable login` runs on. Absent for browser sessions: a browser does not expose one. */
24601
+ device_name?: string;
24576
24602
  client?: components["schemas"]["Client"] | string | unknown;
24577
24603
  connection?: components["schemas"]["Connection"] | string | unknown;
24578
24604
  /** @description Issuer URL the session was minted on. */
@@ -26969,6 +26995,93 @@ export interface operations {
26969
26995
  };
26970
26996
  };
26971
26997
  };
26998
+ "oauth/sessionFromTicket": {
26999
+ parameters: {
27000
+ query: {
27001
+ /** @description A ticket from `POST /oauth/link_ticket`, single use. */
27002
+ ticket: string;
27003
+ /** @description Where to go once the session is open: a path of this host under `/flow/` (e.g. `/flow/account/security?client_id=…`). */
27004
+ redirect_to: string;
27005
+ };
27006
+ header?: never;
27007
+ path?: never;
27008
+ cookie?: never;
27009
+ };
27010
+ requestBody?: never;
27011
+ responses: {
27012
+ /** @description Default Response */
27013
+ 200: {
27014
+ headers: {
27015
+ [name: string]: unknown;
27016
+ };
27017
+ content?: never;
27018
+ };
27019
+ /**
27020
+ * @description `invalid_request` — A required OAuth parameter is missing or two of them are incompatible. `message` says which.
27021
+ *
27022
+ * `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
27023
+ */
27024
+ 400: {
27025
+ headers: {
27026
+ [name: string]: unknown;
27027
+ };
27028
+ content: {
27029
+ "application/json": components["schemas"]["ErrorResponse"] & {
27030
+ /** @enum {string} */
27031
+ error_code?: "invalid_request" | "validation_error";
27032
+ };
27033
+ };
27034
+ };
27035
+ /** @description `user_suspended` — The user is suspended and cannot sign in or be modified. */
27036
+ 403: {
27037
+ headers: {
27038
+ [name: string]: unknown;
27039
+ };
27040
+ content: {
27041
+ "application/json": components["schemas"]["ErrorResponse"] & {
27042
+ /** @enum {string} */
27043
+ error_code?: "user_suspended";
27044
+ };
27045
+ };
27046
+ };
27047
+ /** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
27048
+ 404: {
27049
+ headers: {
27050
+ [name: string]: unknown;
27051
+ };
27052
+ content: {
27053
+ "application/json": components["schemas"]["ErrorResponse"] & {
27054
+ /** @enum {string} */
27055
+ error_code?: "account_not_found";
27056
+ };
27057
+ };
27058
+ };
27059
+ /** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
27060
+ 429: {
27061
+ headers: {
27062
+ [name: string]: unknown;
27063
+ };
27064
+ content: {
27065
+ "application/json": components["schemas"]["ErrorResponse"] & {
27066
+ /** @enum {string} */
27067
+ error_code?: "too_many_requests";
27068
+ };
27069
+ };
27070
+ };
27071
+ /** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
27072
+ 500: {
27073
+ headers: {
27074
+ [name: string]: unknown;
27075
+ };
27076
+ content: {
27077
+ "application/json": components["schemas"]["ErrorResponse"] & {
27078
+ /** @enum {string} */
27079
+ error_code?: "internal_error";
27080
+ };
27081
+ };
27082
+ };
27083
+ };
27084
+ };
26972
27085
  "oauth/tokenGet": {
26973
27086
  parameters: {
26974
27087
  query?: {
package/dist/version.js CHANGED
@@ -9,13 +9,13 @@
9
9
  // login pages could not import the SDK at all. Same pattern as auth-js.
10
10
  //
11
11
  // The sentinels MUST stay byte-identical to the `from` values in `.releaserc`.
12
- export const version = "2.7.57";
12
+ export const version = "2.7.59";
13
13
  // Short git SHA of the released commit. The version dates a build; this names
14
14
  // the exact tree, so a canonical log line or an audit entry leads straight to
15
15
  // `git show <sha>`. Deliberately NOT hex: an unreleased build (dev, a local
16
16
  // link) cannot be mistaken for a real commit — auth only records values that
17
17
  // look like a SHA, and this one never will.
18
- export const commit = "faf0086";
18
+ export const commit = "cb2f244";
19
19
  // What this SDK writes in `x-faable-client`. Exported for a consumer that
20
20
  // builds a strategy on its own (outside `FaableAuthApi`) and still wants the
21
21
  // token request attributed — a bare `authClientCredentials` stamps only what
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/auth-sdk",
3
- "version": "2.7.57",
3
+ "version": "2.7.59",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/spec/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "@faablecloud/auth",
5
5
  "description": "Auth Platform made by Faable. Manage Users and Roles",
6
- "version": "2.49.3",
6
+ "version": "2.51.0",
7
7
  "license": {
8
8
  "name": "private",
9
9
  "url": "https://faable.com/docs/platform/privacy-policy"
@@ -6103,6 +6103,10 @@
6103
6103
  "type": "string",
6104
6104
  "description": "Raw `User-Agent` header at the last authentication."
6105
6105
  },
6106
+ "device_name": {
6107
+ "type": "string",
6108
+ "description": "The name a device gave itself when it asked for a code (device authorization grant), e.g. the hostname `faable login` runs on. Absent for browser sessions: a browser does not expose one."
6109
+ },
6106
6110
  "client": {
6107
6111
  "anyOf": [
6108
6112
  {
@@ -50979,6 +50983,10 @@
50979
50983
  "type": "string",
50980
50984
  "description": "Raw `User-Agent` header at the last authentication."
50981
50985
  },
50986
+ "device_name": {
50987
+ "type": "string",
50988
+ "description": "The name a device gave itself when it asked for a code (device authorization grant), e.g. the hostname `faable login` runs on. Absent for browser sessions: a browser does not expose one."
50989
+ },
50982
50990
  "client": {
50983
50991
  "anyOf": [
50984
50992
  {
@@ -51310,6 +51318,10 @@
51310
51318
  "type": "string",
51311
51319
  "description": "Raw `User-Agent` header at the last authentication."
51312
51320
  },
51321
+ "device_name": {
51322
+ "type": "string",
51323
+ "description": "The name a device gave itself when it asked for a code (device authorization grant), e.g. the hostname `faable login` runs on. Absent for browser sessions: a browser does not expose one."
51324
+ },
51313
51325
  "client": {
51314
51326
  "anyOf": [
51315
51327
  {
@@ -59444,6 +59456,167 @@
59444
59456
  }
59445
59457
  }
59446
59458
  },
59459
+ "/oauth/session-from-ticket": {
59460
+ "get": {
59461
+ "operationId": "oauth/sessionFromTicket",
59462
+ "summary": "Open the hosted session from a ticket",
59463
+ "tags": [
59464
+ "oauth"
59465
+ ],
59466
+ "description": "Consumes a ticket from `POST /oauth/link_ticket`, establishes the cookie session for its user and redirects to `redirect_to`, a hosted screen of this host. For Relying Parties that signed the user in with a direct grant (e.g. passwordless OTP) and so hold no cookie session, when they send the user to an account screen such as `/flow/account/security`.",
59467
+ "parameters": [
59468
+ {
59469
+ "schema": {
59470
+ "type": "string"
59471
+ },
59472
+ "in": "query",
59473
+ "name": "ticket",
59474
+ "required": true,
59475
+ "description": "A ticket from `POST /oauth/link_ticket`, single use."
59476
+ },
59477
+ {
59478
+ "schema": {
59479
+ "type": "string"
59480
+ },
59481
+ "in": "query",
59482
+ "name": "redirect_to",
59483
+ "required": true,
59484
+ "description": "Where to go once the session is open: a path of this host under `/flow/` (e.g. `/flow/account/security?client_id=…`)."
59485
+ }
59486
+ ],
59487
+ "responses": {
59488
+ "200": {
59489
+ "description": "Default Response"
59490
+ },
59491
+ "400": {
59492
+ "description": "`invalid_request` — A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
59493
+ "content": {
59494
+ "application/json": {
59495
+ "schema": {
59496
+ "allOf": [
59497
+ {
59498
+ "$ref": "#/components/schemas/ErrorResponse"
59499
+ },
59500
+ {
59501
+ "type": "object",
59502
+ "properties": {
59503
+ "error_code": {
59504
+ "type": "string",
59505
+ "enum": [
59506
+ "invalid_request",
59507
+ "validation_error"
59508
+ ]
59509
+ }
59510
+ }
59511
+ }
59512
+ ]
59513
+ }
59514
+ }
59515
+ }
59516
+ },
59517
+ "403": {
59518
+ "description": "`user_suspended` — The user is suspended and cannot sign in or be modified.",
59519
+ "content": {
59520
+ "application/json": {
59521
+ "schema": {
59522
+ "allOf": [
59523
+ {
59524
+ "$ref": "#/components/schemas/ErrorResponse"
59525
+ },
59526
+ {
59527
+ "type": "object",
59528
+ "properties": {
59529
+ "error_code": {
59530
+ "type": "string",
59531
+ "enum": [
59532
+ "user_suspended"
59533
+ ]
59534
+ }
59535
+ }
59536
+ }
59537
+ ]
59538
+ }
59539
+ }
59540
+ }
59541
+ },
59542
+ "404": {
59543
+ "description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
59544
+ "content": {
59545
+ "application/json": {
59546
+ "schema": {
59547
+ "allOf": [
59548
+ {
59549
+ "$ref": "#/components/schemas/ErrorResponse"
59550
+ },
59551
+ {
59552
+ "type": "object",
59553
+ "properties": {
59554
+ "error_code": {
59555
+ "type": "string",
59556
+ "enum": [
59557
+ "account_not_found"
59558
+ ]
59559
+ }
59560
+ }
59561
+ }
59562
+ ]
59563
+ }
59564
+ }
59565
+ }
59566
+ },
59567
+ "429": {
59568
+ "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
59569
+ "content": {
59570
+ "application/json": {
59571
+ "schema": {
59572
+ "allOf": [
59573
+ {
59574
+ "$ref": "#/components/schemas/ErrorResponse"
59575
+ },
59576
+ {
59577
+ "type": "object",
59578
+ "properties": {
59579
+ "error_code": {
59580
+ "type": "string",
59581
+ "enum": [
59582
+ "too_many_requests"
59583
+ ]
59584
+ }
59585
+ }
59586
+ }
59587
+ ]
59588
+ }
59589
+ }
59590
+ }
59591
+ },
59592
+ "500": {
59593
+ "description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
59594
+ "content": {
59595
+ "application/json": {
59596
+ "schema": {
59597
+ "allOf": [
59598
+ {
59599
+ "$ref": "#/components/schemas/ErrorResponse"
59600
+ },
59601
+ {
59602
+ "type": "object",
59603
+ "properties": {
59604
+ "error_code": {
59605
+ "type": "string",
59606
+ "enum": [
59607
+ "internal_error"
59608
+ ]
59609
+ }
59610
+ }
59611
+ }
59612
+ ]
59613
+ }
59614
+ }
59615
+ }
59616
+ }
59617
+ }
59618
+ }
59619
+ },
59447
59620
  "/oauth/token": {
59448
59621
  "get": {
59449
59622
  "operationId": "oauth/tokenGet",