@greensecurity/javascript-sdk 0.45.0-beta.16 → 0.45.0-beta.18

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.
Files changed (137) hide show
  1. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  2. package/dist/commonjs/__tests__/webhooks.test.js +1 -1
  3. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/zones.test.js +2 -9
  5. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  6. package/dist/commonjs/funcs/usersPostAuthenticate.d.ts +37 -0
  7. package/dist/commonjs/funcs/usersPostAuthenticate.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/usersPostAuthenticate.js +37 -0
  9. package/dist/commonjs/funcs/usersPostAuthenticate.js.map +1 -1
  10. package/dist/commonjs/lib/config.d.ts +2 -2
  11. package/dist/commonjs/lib/config.js +2 -2
  12. package/dist/commonjs/models/components/authenticatesuccessresponse.d.ts +91 -0
  13. package/dist/commonjs/models/components/authenticatesuccessresponse.d.ts.map +1 -0
  14. package/dist/commonjs/models/components/authenticatesuccessresponse.js +100 -0
  15. package/dist/commonjs/models/components/authenticatesuccessresponse.js.map +1 -0
  16. package/dist/commonjs/models/components/index.d.ts +2 -0
  17. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/index.js +2 -0
  19. package/dist/commonjs/models/components/index.js.map +1 -1
  20. package/dist/commonjs/models/components/loginemailandpassword.d.ts +34 -0
  21. package/dist/commonjs/models/components/loginemailandpassword.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/loginemailandpassword.js +2 -0
  23. package/dist/commonjs/models/components/loginemailandpassword.js.map +1 -1
  24. package/dist/commonjs/models/components/loginrequirementsfromemail.d.ts +34 -0
  25. package/dist/commonjs/models/components/loginrequirementsfromemail.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/loginrequirementsfromemail.js +2 -0
  27. package/dist/commonjs/models/components/loginrequirementsfromemail.js.map +1 -1
  28. package/dist/commonjs/models/components/mfarequiredresponse.d.ts +33 -0
  29. package/dist/commonjs/models/components/mfarequiredresponse.d.ts.map +1 -1
  30. package/dist/commonjs/models/components/mfarequiredresponse.js +2 -0
  31. package/dist/commonjs/models/components/mfarequiredresponse.js.map +1 -1
  32. package/dist/commonjs/models/components/passwordnotsetresponse.d.ts +34 -1
  33. package/dist/commonjs/models/components/passwordnotsetresponse.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/passwordnotsetresponse.js +2 -0
  35. package/dist/commonjs/models/components/passwordnotsetresponse.js.map +1 -1
  36. package/dist/commonjs/models/components/passwordrequiredresponse.d.ts +33 -0
  37. package/dist/commonjs/models/components/passwordrequiredresponse.d.ts.map +1 -1
  38. package/dist/commonjs/models/components/passwordrequiredresponse.js +6 -0
  39. package/dist/commonjs/models/components/passwordrequiredresponse.js.map +1 -1
  40. package/dist/commonjs/models/components/samlloginrequiredresponse.d.ts +33 -0
  41. package/dist/commonjs/models/components/samlloginrequiredresponse.d.ts.map +1 -1
  42. package/dist/commonjs/models/components/samlloginrequiredresponse.js +2 -0
  43. package/dist/commonjs/models/components/samlloginrequiredresponse.js.map +1 -1
  44. package/dist/commonjs/models/components/ssocontinuation.d.ts +44 -0
  45. package/dist/commonjs/models/components/ssocontinuation.d.ts.map +1 -0
  46. package/dist/commonjs/models/components/ssocontinuation.js +56 -0
  47. package/dist/commonjs/models/components/ssocontinuation.js.map +1 -0
  48. package/dist/commonjs/models/operations/postauthenticate.d.ts +1 -1
  49. package/dist/commonjs/models/operations/postauthenticate.d.ts.map +1 -1
  50. package/dist/commonjs/models/operations/postauthenticate.js +1 -1
  51. package/dist/commonjs/models/operations/postauthenticate.js.map +1 -1
  52. package/dist/commonjs/react-query/usersPostAuthenticate.d.ts +37 -0
  53. package/dist/commonjs/react-query/usersPostAuthenticate.d.ts.map +1 -1
  54. package/dist/commonjs/react-query/usersPostAuthenticate.js +37 -0
  55. package/dist/commonjs/react-query/usersPostAuthenticate.js.map +1 -1
  56. package/dist/commonjs/sdk/users.d.ts +37 -0
  57. package/dist/commonjs/sdk/users.d.ts.map +1 -1
  58. package/dist/commonjs/sdk/users.js +37 -0
  59. package/dist/commonjs/sdk/users.js.map +1 -1
  60. package/dist/esm/__tests__/vendors.test.js +1 -1
  61. package/dist/esm/__tests__/webhooks.test.js +1 -1
  62. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  63. package/dist/esm/__tests__/zones.test.js +2 -9
  64. package/dist/esm/__tests__/zones.test.js.map +1 -1
  65. package/dist/esm/funcs/usersPostAuthenticate.d.ts +37 -0
  66. package/dist/esm/funcs/usersPostAuthenticate.d.ts.map +1 -1
  67. package/dist/esm/funcs/usersPostAuthenticate.js +37 -0
  68. package/dist/esm/funcs/usersPostAuthenticate.js.map +1 -1
  69. package/dist/esm/lib/config.d.ts +2 -2
  70. package/dist/esm/lib/config.js +2 -2
  71. package/dist/esm/models/components/authenticatesuccessresponse.d.ts +91 -0
  72. package/dist/esm/models/components/authenticatesuccessresponse.d.ts.map +1 -0
  73. package/dist/esm/models/components/authenticatesuccessresponse.js +61 -0
  74. package/dist/esm/models/components/authenticatesuccessresponse.js.map +1 -0
  75. package/dist/esm/models/components/index.d.ts +2 -0
  76. package/dist/esm/models/components/index.d.ts.map +1 -1
  77. package/dist/esm/models/components/index.js +2 -0
  78. package/dist/esm/models/components/index.js.map +1 -1
  79. package/dist/esm/models/components/loginemailandpassword.d.ts +34 -0
  80. package/dist/esm/models/components/loginemailandpassword.d.ts.map +1 -1
  81. package/dist/esm/models/components/loginemailandpassword.js +2 -0
  82. package/dist/esm/models/components/loginemailandpassword.js.map +1 -1
  83. package/dist/esm/models/components/loginrequirementsfromemail.d.ts +34 -0
  84. package/dist/esm/models/components/loginrequirementsfromemail.d.ts.map +1 -1
  85. package/dist/esm/models/components/loginrequirementsfromemail.js +2 -0
  86. package/dist/esm/models/components/loginrequirementsfromemail.js.map +1 -1
  87. package/dist/esm/models/components/mfarequiredresponse.d.ts +33 -0
  88. package/dist/esm/models/components/mfarequiredresponse.d.ts.map +1 -1
  89. package/dist/esm/models/components/mfarequiredresponse.js +2 -0
  90. package/dist/esm/models/components/mfarequiredresponse.js.map +1 -1
  91. package/dist/esm/models/components/passwordnotsetresponse.d.ts +34 -1
  92. package/dist/esm/models/components/passwordnotsetresponse.d.ts.map +1 -1
  93. package/dist/esm/models/components/passwordnotsetresponse.js +2 -0
  94. package/dist/esm/models/components/passwordnotsetresponse.js.map +1 -1
  95. package/dist/esm/models/components/passwordrequiredresponse.d.ts +33 -0
  96. package/dist/esm/models/components/passwordrequiredresponse.d.ts.map +1 -1
  97. package/dist/esm/models/components/passwordrequiredresponse.js +6 -0
  98. package/dist/esm/models/components/passwordrequiredresponse.js.map +1 -1
  99. package/dist/esm/models/components/samlloginrequiredresponse.d.ts +33 -0
  100. package/dist/esm/models/components/samlloginrequiredresponse.d.ts.map +1 -1
  101. package/dist/esm/models/components/samlloginrequiredresponse.js +2 -0
  102. package/dist/esm/models/components/samlloginrequiredresponse.js.map +1 -1
  103. package/dist/esm/models/components/ssocontinuation.d.ts +44 -0
  104. package/dist/esm/models/components/ssocontinuation.d.ts.map +1 -0
  105. package/dist/esm/models/components/ssocontinuation.js +19 -0
  106. package/dist/esm/models/components/ssocontinuation.js.map +1 -0
  107. package/dist/esm/models/operations/postauthenticate.d.ts +1 -1
  108. package/dist/esm/models/operations/postauthenticate.d.ts.map +1 -1
  109. package/dist/esm/models/operations/postauthenticate.js +1 -1
  110. package/dist/esm/models/operations/postauthenticate.js.map +1 -1
  111. package/dist/esm/react-query/usersPostAuthenticate.d.ts +37 -0
  112. package/dist/esm/react-query/usersPostAuthenticate.d.ts.map +1 -1
  113. package/dist/esm/react-query/usersPostAuthenticate.js +37 -0
  114. package/dist/esm/react-query/usersPostAuthenticate.js.map +1 -1
  115. package/dist/esm/sdk/users.d.ts +37 -0
  116. package/dist/esm/sdk/users.d.ts.map +1 -1
  117. package/dist/esm/sdk/users.js +37 -0
  118. package/dist/esm/sdk/users.js.map +1 -1
  119. package/jsr.json +1 -1
  120. package/package.json +1 -1
  121. package/src/__tests__/vendors.test.ts +1 -1
  122. package/src/__tests__/webhooks.test.ts +1 -1
  123. package/src/__tests__/zones.test.ts +2 -9
  124. package/src/funcs/usersPostAuthenticate.ts +37 -0
  125. package/src/lib/config.ts +2 -2
  126. package/src/models/components/authenticatesuccessresponse.ts +189 -0
  127. package/src/models/components/index.ts +2 -0
  128. package/src/models/components/loginemailandpassword.ts +36 -0
  129. package/src/models/components/loginrequirementsfromemail.ts +36 -0
  130. package/src/models/components/mfarequiredresponse.ts +35 -0
  131. package/src/models/components/passwordnotsetresponse.ts +36 -1
  132. package/src/models/components/passwordrequiredresponse.ts +39 -0
  133. package/src/models/components/samlloginrequiredresponse.ts +35 -0
  134. package/src/models/components/ssocontinuation.ts +71 -0
  135. package/src/models/operations/postauthenticate.ts +2 -2
  136. package/src/react-query/usersPostAuthenticate.ts +37 -0
  137. package/src/sdk/users.ts +37 -0
@@ -44,9 +44,11 @@ const primitives_js_1 = require("../../lib/primitives.js");
44
44
  exports.LoginRequirementsFromEmail$outboundSchema = z.object({
45
45
  email: z.string(),
46
46
  returnUrl: z.string(),
47
+ ssoState: z.string().optional(),
47
48
  }).transform((v) => {
48
49
  return (0, primitives_js_1.remap)(v, {
49
50
  returnUrl: "return_url",
51
+ ssoState: "sso_state",
50
52
  });
51
53
  });
52
54
  function loginRequirementsFromEmailToJSON(loginRequirementsFromEmail) {
@@ -1 +1 @@
1
- {"version":3,"file":"loginrequirementsfromemail.js","sourceRoot":"","sources":["../../../../src/models/components/loginrequirementsfromemail.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCH,4EAMC;AA3CD,0CAA4B;AAC5B,2DAA0D;AAsB1D,gBAAgB;AACH,QAAA,yCAAyC,GAIlD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAAS,CACnB,iDAAyC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAC5E,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"loginrequirementsfromemail.js","sourceRoot":"","sources":["../../../../src/models/components/loginrequirementsfromemail.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EH,4EAMC;AA/ED,0CAA4B;AAC5B,2DAA0D;AAwD1D,gBAAgB;AACH,QAAA,yCAAyC,GAIlD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;QACvB,QAAQ,EAAE,WAAW;KACtB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAAS,CACnB,iDAAyC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAC5E,CAAC;AACJ,CAAC"}
@@ -26,6 +26,39 @@ export type MfaRequiredResponse = {
26
26
  */
27
27
  mobilePhone?: string | undefined;
28
28
  mfaMethod?: MfaMethod | undefined;
29
+ /**
30
+ * Opaque, signed state that Green Security issues when a third-party service
31
+ *
32
+ * @remarks
33
+ * provider starts a "Login with Green Security" SAML flow at
34
+ * `/saml/idp/sso`. The login screen receives it as the `sso_state` query
35
+ * string parameter and must pass it back, byte for byte, on every call to
36
+ * this endpoint for the remainder of the login journey — including the
37
+ * second call that carries an `mfa_code`.
38
+ *
39
+ * The blob is signed, not encrypted, and it expires five minutes after the
40
+ * service provider's request arrives. Do not parse it, shorten it, decode
41
+ * it, or re-encode it.
42
+ *
43
+ * **An invalid blob does not fail the login.** This is the opposite of what
44
+ * most integrators assume, so it is worth stating plainly: a forged, edited
45
+ * or expired `sso_state` is silently discarded, and the request then
46
+ * proceeds as an ordinary login. Valid credentials still authenticate and
47
+ * still return `200` — just with no `sso` object, leaving the user signed in
48
+ * to Green Security with no way back to the service provider that sent them.
49
+ * Never treat a `200` as proof that the SSO hand-off survived; check for
50
+ * `sso` explicitly.
51
+ *
52
+ * Every `202` response echoes the *verified* blob back in its own
53
+ * `sso_state` field. Always send back the value from the response you just
54
+ * received rather than the one you started with, so that a blob the server
55
+ * has already rejected is never resent, and so a client does not have to
56
+ * hold state of its own across the login journey.
57
+ *
58
+ * Omit this field entirely for an ordinary login that did not originate
59
+ * from a service provider.
60
+ */
61
+ ssoState?: string | undefined;
29
62
  };
30
63
  /** @internal */
31
64
  export declare const MfaMethod$inboundSchema: z.ZodType<MfaMethod, z.ZodTypeDef, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"mfarequiredresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/mfarequiredresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAI5B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAC7C,SAAS,EACT,CAAC,CAAC,UAAU,EACZ,OAAO,CAC6B,CAAC;AAEvC,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D"}
1
+ {"version":3,"file":"mfarequiredresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/mfarequiredresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAI5B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAC7C,SAAS,EACT,CAAC,CAAC,UAAU,EACZ,OAAO,CAC6B,CAAC;AAEvC,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAcP,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D"}
@@ -56,10 +56,12 @@ exports.MfaRequiredResponse$inboundSchema = z.object({
56
56
  error: types.string(),
57
57
  mobile_phone: types.optional(types.string()),
58
58
  mfa_method: types.optional(exports.MfaMethod$inboundSchema),
59
+ sso_state: types.optional(types.string()),
59
60
  }).transform((v) => {
60
61
  return (0, primitives_js_1.remap)(v, {
61
62
  "mobile_phone": "mobilePhone",
62
63
  "mfa_method": "mfaMethod",
64
+ "sso_state": "ssoState",
63
65
  });
64
66
  });
65
67
  function mfaRequiredResponseFromJSON(jsonString) {
@@ -1 +1 @@
1
- {"version":3,"file":"mfarequiredresponse.js","sourceRoot":"","sources":["../../../../src/models/components/mfarequiredresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DH,kEAQC;AArED,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AACjD,gEAAkD;AAGlD,iEAAmD;AAGtC,QAAA,SAAS,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC;AAwBX,gBAAgB;AACH,QAAA,uBAAuB,GAIhC,SAAS,CAAC,aAAa,CAAC,iBAAS,CAAC,CAAC;AAEvC,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;IACnC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAC5C,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,+BAAuB,CAAC;CACpD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;QAC7B,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,2BAA2B,CACzC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"mfarequiredresponse.js","sourceRoot":"","sources":["../../../../src/models/components/mfarequiredresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkGH,kEAQC;AAxGD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AACjD,gEAAkD;AAGlD,iEAAmD;AAGtC,QAAA,SAAS,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC;AAyDX,gBAAgB;AACH,QAAA,uBAAuB,GAIhC,SAAS,CAAC,aAAa,CAAC,iBAAS,CAAC,CAAC;AAEvC,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;IACnC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAC5C,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,+BAAuB,CAAC;IACnD,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;QAC7B,YAAY,EAAE,WAAW;QACzB,WAAW,EAAE,UAAU;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,2BAA2B,CACzC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
@@ -12,9 +12,42 @@ export type PasswordNotSetResponse = {
12
12
  */
13
13
  error: string;
14
14
  /**
15
- * URL to redirect the user to set their password (forgot password flow). Includes return_url query param when provided in the request.
15
+ * URL to redirect the user to set their password (forgot password flow). Carries the `return_url` and `sso_state` query params when those were provided on the request, because the browser follows this redirect and leaves the JSON body behind.
16
16
  */
17
17
  redirectUrl: string;
18
+ /**
19
+ * Opaque, signed state that Green Security issues when a third-party service
20
+ *
21
+ * @remarks
22
+ * provider starts a "Login with Green Security" SAML flow at
23
+ * `/saml/idp/sso`. The login screen receives it as the `sso_state` query
24
+ * string parameter and must pass it back, byte for byte, on every call to
25
+ * this endpoint for the remainder of the login journey — including the
26
+ * second call that carries an `mfa_code`.
27
+ *
28
+ * The blob is signed, not encrypted, and it expires five minutes after the
29
+ * service provider's request arrives. Do not parse it, shorten it, decode
30
+ * it, or re-encode it.
31
+ *
32
+ * **An invalid blob does not fail the login.** This is the opposite of what
33
+ * most integrators assume, so it is worth stating plainly: a forged, edited
34
+ * or expired `sso_state` is silently discarded, and the request then
35
+ * proceeds as an ordinary login. Valid credentials still authenticate and
36
+ * still return `200` — just with no `sso` object, leaving the user signed in
37
+ * to Green Security with no way back to the service provider that sent them.
38
+ * Never treat a `200` as proof that the SSO hand-off survived; check for
39
+ * `sso` explicitly.
40
+ *
41
+ * Every `202` response echoes the *verified* blob back in its own
42
+ * `sso_state` field. Always send back the value from the response you just
43
+ * received rather than the one you started with, so that a blob the server
44
+ * has already rejected is never resent, and so a client does not have to
45
+ * hold state of its own across the login journey.
46
+ *
47
+ * Omit this field entirely for an ordinary login that did not originate
48
+ * from a service provider.
49
+ */
50
+ ssoState?: string | undefined;
18
51
  };
19
52
  /** @internal */
20
53
  export declare const PasswordNotSetResponse$inboundSchema: z.ZodType<PasswordNotSetResponse, z.ZodTypeDef, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"passwordnotsetresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/passwordnotsetresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAUP,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
1
+ {"version":3,"file":"passwordnotsetresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/passwordnotsetresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
@@ -48,9 +48,11 @@ exports.PasswordNotSetResponse$inboundSchema = z.object({
48
48
  success: types.boolean(),
49
49
  error: types.string(),
50
50
  redirect_url: types.string(),
51
+ sso_state: types.optional(types.string()),
51
52
  }).transform((v) => {
52
53
  return (0, primitives_js_1.remap)(v, {
53
54
  "redirect_url": "redirectUrl",
55
+ "sso_state": "ssoState",
54
56
  });
55
57
  });
56
58
  function passwordNotSetResponseFromJSON(jsonString) {
@@ -1 +1 @@
1
- {"version":3,"file":"passwordnotsetresponse.js","sourceRoot":"","sources":["../../../../src/models/components/passwordnotsetresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCH,wEAQC;AA/CD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAEjD,iEAAmD;AAmBnD,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC;IACzC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,KAAK,CAAC,MAAM,EAAE;CAC7B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"passwordnotsetresponse.js","sourceRoot":"","sources":["../../../../src/models/components/passwordnotsetresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EH,wEAQC;AAlFD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAEjD,iEAAmD;AAoDnD,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC;IACzC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,KAAK,CAAC,MAAM,EAAE;IAC5B,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;QAC7B,WAAW,EAAE,UAAU;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
@@ -11,6 +11,39 @@ export type PasswordRequiredResponse = {
11
11
  * Error describing the exact condition of what further steps are needed to finish the login process.
12
12
  */
13
13
  error: string;
14
+ /**
15
+ * Opaque, signed state that Green Security issues when a third-party service
16
+ *
17
+ * @remarks
18
+ * provider starts a "Login with Green Security" SAML flow at
19
+ * `/saml/idp/sso`. The login screen receives it as the `sso_state` query
20
+ * string parameter and must pass it back, byte for byte, on every call to
21
+ * this endpoint for the remainder of the login journey — including the
22
+ * second call that carries an `mfa_code`.
23
+ *
24
+ * The blob is signed, not encrypted, and it expires five minutes after the
25
+ * service provider's request arrives. Do not parse it, shorten it, decode
26
+ * it, or re-encode it.
27
+ *
28
+ * **An invalid blob does not fail the login.** This is the opposite of what
29
+ * most integrators assume, so it is worth stating plainly: a forged, edited
30
+ * or expired `sso_state` is silently discarded, and the request then
31
+ * proceeds as an ordinary login. Valid credentials still authenticate and
32
+ * still return `200` — just with no `sso` object, leaving the user signed in
33
+ * to Green Security with no way back to the service provider that sent them.
34
+ * Never treat a `200` as proof that the SSO hand-off survived; check for
35
+ * `sso` explicitly.
36
+ *
37
+ * Every `202` response echoes the *verified* blob back in its own
38
+ * `sso_state` field. Always send back the value from the response you just
39
+ * received rather than the one you started with, so that a blob the server
40
+ * has already rejected is never resent, and so a client does not have to
41
+ * hold state of its own across the login journey.
42
+ *
43
+ * Omit this field entirely for an ordinary login that did not originate
44
+ * from a service provider.
45
+ */
46
+ ssoState?: string | undefined;
14
47
  };
15
48
  /** @internal */
16
49
  export declare const PasswordRequiredResponse$inboundSchema: z.ZodType<PasswordRequiredResponse, z.ZodTypeDef, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"passwordrequiredresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/passwordrequiredresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
1
+ {"version":3,"file":"passwordrequiredresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/passwordrequiredresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAUP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.PasswordRequiredResponse$inboundSchema = void 0;
40
40
  exports.passwordRequiredResponseFromJSON = passwordRequiredResponseFromJSON;
41
41
  const z = __importStar(require("zod/v3"));
42
+ const primitives_js_1 = require("../../lib/primitives.js");
42
43
  const schemas_js_1 = require("../../lib/schemas.js");
43
44
  const types = __importStar(require("../../types/primitives.js"));
44
45
  /** @internal */
@@ -46,6 +47,11 @@ exports.PasswordRequiredResponse$inboundSchema = z.object({
46
47
  requires: types.literal("password"),
47
48
  success: types.boolean(),
48
49
  error: types.string(),
50
+ sso_state: types.optional(types.string()),
51
+ }).transform((v) => {
52
+ return (0, primitives_js_1.remap)(v, {
53
+ "sso_state": "ssoState",
54
+ });
49
55
  });
50
56
  function passwordRequiredResponseFromJSON(jsonString) {
51
57
  return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PasswordRequiredResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PasswordRequiredResponse' from JSON`);
@@ -1 +1 @@
1
- {"version":3,"file":"passwordrequiredresponse.js","sourceRoot":"","sources":["../../../../src/models/components/passwordrequiredresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BH,4EAQC;AArCD,0CAA4B;AAC5B,qDAAiD;AAEjD,iEAAmD;AAenD,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;IACnC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAEH,SAAgB,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"passwordrequiredresponse.js","sourceRoot":"","sources":["../../../../src/models/components/passwordrequiredresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEH,4EAQC;AA5ED,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAEjD,iEAAmD;AAgDnD,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;IACnC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,WAAW,EAAE,UAAU;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
@@ -20,6 +20,39 @@ export type SamlLoginRequiredResponse = {
20
20
  * This is the URL that should be opened to initiate the SAML login flow
21
21
  */
22
22
  ssoUrl: string;
23
+ /**
24
+ * Opaque, signed state that Green Security issues when a third-party service
25
+ *
26
+ * @remarks
27
+ * provider starts a "Login with Green Security" SAML flow at
28
+ * `/saml/idp/sso`. The login screen receives it as the `sso_state` query
29
+ * string parameter and must pass it back, byte for byte, on every call to
30
+ * this endpoint for the remainder of the login journey — including the
31
+ * second call that carries an `mfa_code`.
32
+ *
33
+ * The blob is signed, not encrypted, and it expires five minutes after the
34
+ * service provider's request arrives. Do not parse it, shorten it, decode
35
+ * it, or re-encode it.
36
+ *
37
+ * **An invalid blob does not fail the login.** This is the opposite of what
38
+ * most integrators assume, so it is worth stating plainly: a forged, edited
39
+ * or expired `sso_state` is silently discarded, and the request then
40
+ * proceeds as an ordinary login. Valid credentials still authenticate and
41
+ * still return `200` — just with no `sso` object, leaving the user signed in
42
+ * to Green Security with no way back to the service provider that sent them.
43
+ * Never treat a `200` as proof that the SSO hand-off survived; check for
44
+ * `sso` explicitly.
45
+ *
46
+ * Every `202` response echoes the *verified* blob back in its own
47
+ * `sso_state` field. Always send back the value from the response you just
48
+ * received rather than the one you started with, so that a blob the server
49
+ * has already rejected is never resent, and so a client does not have to
50
+ * hold state of its own across the login journey.
51
+ *
52
+ * Omit this field entirely for an ordinary login that did not originate
53
+ * from a service provider.
54
+ */
55
+ ssoState?: string | undefined;
23
56
  };
24
57
  /** @internal */
25
58
  export declare const SamlLoginRequiredResponse$inboundSchema: z.ZodType<SamlLoginRequiredResponse, z.ZodTypeDef, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"samlloginrequiredresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/samlloginrequiredresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,yBAAyB,EACzB,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAMhE"}
1
+ {"version":3,"file":"samlloginrequiredresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/samlloginrequiredresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,yBAAyB,EACzB,CAAC,CAAC,UAAU,EACZ,OAAO,CAcP,CAAC;AAEH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAMhE"}
@@ -49,10 +49,12 @@ exports.SamlLoginRequiredResponse$inboundSchema = z.object({
49
49
  error: types.string(),
50
50
  sso_instructions: types.optional(types.string()),
51
51
  sso_url: types.string(),
52
+ sso_state: types.optional(types.string()),
52
53
  }).transform((v) => {
53
54
  return (0, primitives_js_1.remap)(v, {
54
55
  "sso_instructions": "ssoInstructions",
55
56
  "sso_url": "ssoUrl",
57
+ "sso_state": "ssoState",
56
58
  });
57
59
  });
58
60
  function samlLoginRequiredResponseFromJSON(jsonString) {
@@ -1 +1 @@
1
- {"version":3,"file":"samlloginrequiredresponse.js","sourceRoot":"","sources":["../../../../src/models/components/samlloginrequiredresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDH,8EAQC;AAtDD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAEjD,iEAAmD;AAwBnD,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;IACrC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;IACrB,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAChD,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE;CACxB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,kBAAkB,EAAE,iBAAiB;QACrC,SAAS,EAAE,QAAQ;KACpB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,iCAAiC,CAC/C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,+CAAuC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACnE,uDAAuD,CACxD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"samlloginrequiredresponse.js","sourceRoot":"","sources":["../../../../src/models/components/samlloginrequiredresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFH,8EAQC;AAzFD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAEjD,iEAAmD;AAyDnD,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;IACrC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;IACrB,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAChD,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE;IACvB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,kBAAkB,EAAE,iBAAiB;QACrC,SAAS,EAAE,QAAQ;QACnB,WAAW,EAAE,UAAU;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,iCAAiC,CAC/C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,+CAAuC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACnE,uDAAuD,CACxD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,44 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ /**
5
+ * Where to send the browser to finish a "Login with Green Security" flow.
6
+ *
7
+ * @remarks
8
+ *
9
+ * Present on a `200` from `POST /users/authenticate` only when the request
10
+ * carried a valid, unexpired `sso_state`. Its absence means the login
11
+ * succeeded but the SAML flow did not resume — treat the login as an
12
+ * ordinary one rather than retrying.
13
+ *
14
+ * This object is additive. The login itself is unaffected by it: the
15
+ * caller's own permanent token is in `user_token` exactly as it would be on
16
+ * any other successful authentication, and it is not the token embedded in
17
+ * `continue_url`.
18
+ */
19
+ export type SsoContinuation = {
20
+ /**
21
+ * An absolute, single-use URL on Green Security's domain. Navigate the
22
+ *
23
+ * @remarks
24
+ * browser to it (a full page navigation, not `fetch`); it answers with a
25
+ * self-submitting form that POSTs the signed `SAMLResponse` and the
26
+ * original `RelayState` to the service provider's assertion consumer
27
+ * service URL.
28
+ *
29
+ * The `token` in this URL is a separate **one-time** token that is
30
+ * consumed the first time the URL is followed, so the URL is good for
31
+ * exactly one navigation. It is not the caller's permanent token, which
32
+ * is returned unchanged in `user_token`. Treat the URL as a secret:
33
+ * whoever follows it first receives that user's assertion.
34
+ *
35
+ * Never fetch this URL from your own back end: the response is meant for
36
+ * the user's browser, and posting the assertion from anywhere else
37
+ * breaks the flow.
38
+ */
39
+ continueUrl: string;
40
+ };
41
+ /** @internal */
42
+ export declare const SsoContinuation$inboundSchema: z.ZodType<SsoContinuation, z.ZodTypeDef, unknown>;
43
+ export declare function ssoContinuationFromJSON(jsonString: string): SafeParseResult<SsoContinuation, SDKValidationError>;
44
+ //# sourceMappingURL=ssocontinuation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssocontinuation.d.ts","sourceRoot":"","sources":["../../../../src/models/components/ssocontinuation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,OAAO,CACnD,eAAe,EACf,CAAC,CAAC,UAAU,EACZ,OAAO,CAOP,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAMtD"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.SsoContinuation$inboundSchema = void 0;
40
+ exports.ssoContinuationFromJSON = ssoContinuationFromJSON;
41
+ const z = __importStar(require("zod/v3"));
42
+ const primitives_js_1 = require("../../lib/primitives.js");
43
+ const schemas_js_1 = require("../../lib/schemas.js");
44
+ const types = __importStar(require("../../types/primitives.js"));
45
+ /** @internal */
46
+ exports.SsoContinuation$inboundSchema = z.object({
47
+ continue_url: types.string(),
48
+ }).transform((v) => {
49
+ return (0, primitives_js_1.remap)(v, {
50
+ "continue_url": "continueUrl",
51
+ });
52
+ });
53
+ function ssoContinuationFromJSON(jsonString) {
54
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SsoContinuation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SsoContinuation' from JSON`);
55
+ }
56
+ //# sourceMappingURL=ssocontinuation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssocontinuation.js","sourceRoot":"","sources":["../../../../src/models/components/ssocontinuation.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DH,0DAQC;AAlED,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAEjD,iEAAmD;AAyCnD,gBAAgB;AACH,QAAA,6BAA6B,GAItC,CAAC,CAAC,MAAM,CAAC;IACX,YAAY,EAAE,KAAK,CAAC,MAAM,EAAE;CAC7B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,uBAAuB,CACrC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAA6B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzD,6CAA6C,CAC9C,CAAC;AACJ,CAAC"}
@@ -10,7 +10,7 @@ export type PostAuthenticateRequestBody = components.LoginEmailAndPassword | com
10
10
  * The request has been accepted for processing, but the processing has not been completed. The request might be processed later.
11
11
  */
12
12
  export type PostAuthenticateResponseBody = components.MfaRequiredResponse | components.SamlLoginRequiredResponse | components.PasswordRequiredResponse | components.PasswordNotSetResponse;
13
- export type PostAuthenticateResponse = components.User | components.MfaRequiredResponse | components.SamlLoginRequiredResponse | components.PasswordRequiredResponse | components.PasswordNotSetResponse;
13
+ export type PostAuthenticateResponse = components.AuthenticateSuccessResponse | components.MfaRequiredResponse | components.SamlLoginRequiredResponse | components.PasswordRequiredResponse | components.PasswordNotSetResponse;
14
14
  /** @internal */
15
15
  export type PostAuthenticateRequestBody$Outbound = components.LoginEmailAndPassword$Outbound | components.LoginRequirementsFromEmail$Outbound;
16
16
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"postauthenticate.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/postauthenticate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACnC,UAAU,CAAC,qBAAqB,GAChC,UAAU,CAAC,0BAA0B,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,4BAA4B,GACpC,UAAU,CAAC,mBAAmB,GAC9B,UAAU,CAAC,yBAAyB,GACpC,UAAU,CAAC,wBAAwB,GACnC,UAAU,CAAC,sBAAsB,CAAC;AAEtC,MAAM,MAAM,wBAAwB,GAChC,UAAU,CAAC,IAAI,GACf,UAAU,CAAC,mBAAmB,GAC9B,UAAU,CAAC,yBAAyB,GACpC,UAAU,CAAC,wBAAwB,GACnC,UAAU,CAAC,sBAAsB,CAAC;AAEtC,gBAAgB;AAChB,MAAM,MAAM,oCAAoC,GAC5C,UAAU,CAAC,8BAA8B,GACzC,UAAU,CAAC,mCAAmC,CAAC;AAEnD,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,oCAAoC,EACpC,CAAC,CAAC,UAAU,EACZ,2BAA2B,CAI3B,CAAC;AAEH,wBAAgB,iCAAiC,CAC/C,2BAA2B,EAAE,2BAA2B,GACvD,MAAM,CAMR;AAED,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,OAAO,CAMP,CAAC;AAEH,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAMnE;AAED,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
1
+ {"version":3,"file":"postauthenticate.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/postauthenticate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACnC,UAAU,CAAC,qBAAqB,GAChC,UAAU,CAAC,0BAA0B,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,4BAA4B,GACpC,UAAU,CAAC,mBAAmB,GAC9B,UAAU,CAAC,yBAAyB,GACpC,UAAU,CAAC,wBAAwB,GACnC,UAAU,CAAC,sBAAsB,CAAC;AAEtC,MAAM,MAAM,wBAAwB,GAChC,UAAU,CAAC,2BAA2B,GACtC,UAAU,CAAC,mBAAmB,GAC9B,UAAU,CAAC,yBAAyB,GACpC,UAAU,CAAC,wBAAwB,GACnC,UAAU,CAAC,sBAAsB,CAAC;AAEtC,gBAAgB;AAChB,MAAM,MAAM,oCAAoC,GAC5C,UAAU,CAAC,8BAA8B,GACzC,UAAU,CAAC,mCAAmC,CAAC;AAEnD,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,oCAAoC,EACpC,CAAC,CAAC,UAAU,EACZ,2BAA2B,CAI3B,CAAC;AAEH,wBAAgB,iCAAiC,CAC/C,2BAA2B,EAAE,2BAA2B,GACvD,MAAM,CAMR;AAED,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,OAAO,CAMP,CAAC;AAEH,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAMnE;AAED,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
@@ -64,7 +64,7 @@ function postAuthenticateResponseBodyFromJSON(jsonString) {
64
64
  }
65
65
  /** @internal */
66
66
  exports.PostAuthenticateResponse$inboundSchema = (0, smartUnion_js_1.smartUnion)([
67
- components.User$inboundSchema,
67
+ components.AuthenticateSuccessResponse$inboundSchema,
68
68
  z.union([
69
69
  components.MfaRequiredResponse$inboundSchema,
70
70
  components.SamlLoginRequiredResponse$inboundSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"postauthenticate.js","sourceRoot":"","sources":["../../../../src/models/operations/postauthenticate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CH,8EAQC;AAcD,oFAQC;AAiBD,4EAQC;AApGD,0CAA4B;AAC5B,qDAAiD;AAEjD,6DAAuD;AACvD,mEAAqD;AA+BrD,gBAAgB;AACH,QAAA,0CAA0C,GAInD,IAAA,0BAAU,EAAC;IACb,UAAU,CAAC,oCAAoC;IAC/C,UAAU,CAAC,yCAAyC;CACrD,CAAC,CAAC;AAEH,SAAgB,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,kDAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AACH,QAAA,0CAA0C,GAInD,CAAC,CAAC,KAAK,CAAC;IACV,UAAU,CAAC,iCAAiC;IAC5C,UAAU,CAAC,uCAAuC;IAClD,UAAU,CAAC,sCAAsC;IACjD,UAAU,CAAC,oCAAoC;CAChD,CAAC,CAAC;AAEH,SAAgB,oCAAoC,CAClD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kDAA0C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtE,0DAA0D,CAC3D,CAAC;AACJ,CAAC;AAED,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,IAAA,0BAAU,EAAC;IACb,UAAU,CAAC,kBAAkB;IAC7B,CAAC,CAAC,KAAK,CAAC;QACN,UAAU,CAAC,iCAAiC;QAC5C,UAAU,CAAC,uCAAuC;QAClD,UAAU,CAAC,sCAAsC;QACjD,UAAU,CAAC,oCAAoC;KAChD,CAAC;CACH,CAAC,CAAC;AAEH,SAAgB,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"postauthenticate.js","sourceRoot":"","sources":["../../../../src/models/operations/postauthenticate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CH,8EAQC;AAcD,oFAQC;AAiBD,4EAQC;AApGD,0CAA4B;AAC5B,qDAAiD;AAEjD,6DAAuD;AACvD,mEAAqD;AA+BrD,gBAAgB;AACH,QAAA,0CAA0C,GAInD,IAAA,0BAAU,EAAC;IACb,UAAU,CAAC,oCAAoC;IAC/C,UAAU,CAAC,yCAAyC;CACrD,CAAC,CAAC;AAEH,SAAgB,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,kDAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AACH,QAAA,0CAA0C,GAInD,CAAC,CAAC,KAAK,CAAC;IACV,UAAU,CAAC,iCAAiC;IAC5C,UAAU,CAAC,uCAAuC;IAClD,UAAU,CAAC,sCAAsC;IACjD,UAAU,CAAC,oCAAoC;CAChD,CAAC,CAAC;AAEH,SAAgB,oCAAoC,CAClD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kDAA0C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtE,0DAA0D,CAC3D,CAAC;AACJ,CAAC;AAED,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,IAAA,0BAAU,EAAC;IACb,UAAU,CAAC,yCAAyC;IACpD,CAAC,CAAC,KAAK,CAAC;QACN,UAAU,CAAC,iCAAiC;QAC5C,UAAU,CAAC,uCAAuC;QAClD,UAAU,CAAC,sCAAsC;QACjD,UAAU,CAAC,oCAAoC;KAChD,CAAC;CACH,CAAC,CAAC;AAEH,SAAgB,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
@@ -49,6 +49,43 @@ export type UsersPostAuthenticateMutationError = errors.ApiErrorResponse | Green
49
49
  * 3. Site redirects to your selected `return_url`
50
50
  * 4. The `user_token` will be appended as a query string parameter to your `return_url` - you must parse this token and store it
51
51
  * 5. Fetch the user object from `/users/me` using the token
52
+ *
53
+ * ## Finishing a "Login with Green Security" flow
54
+ *
55
+ * Green Security is also a SAML2 **identity provider**. When a third-party service provider sends a user to
56
+ * `/saml/idp/sso` to sign in with their Green Security account, the user lands on a Green Security login screen
57
+ * carrying an `sso_state` query string parameter. That parameter is a signed, five-minute record of which service
58
+ * provider is waiting, where its assertion consumer service lives, and what `RelayState` it sent.
59
+ *
60
+ * Authentication itself is unchanged - the user may still need a password, an MFA code, a magic link or a round trip
61
+ * to their own SAML IdP, and every `requires` value above applies as normal. The only difference is that you must
62
+ * echo `sso_state` back on **every** call in the sequence, unchanged, including the follow-up that carries the
63
+ * `mfa_code`.
64
+ *
65
+ * Each `202` response carries the verified blob back to you in its own top-level `sso_state` field. Send back the
66
+ * value from the response you just received rather than the one you started with. The two are normally the same
67
+ * string, but re-sending your original copy is how a blob the server has already rejected gets resent, and it forces
68
+ * you to hold login state you would otherwise not need.
69
+ *
70
+ * 1. Read `sso_state` from the query string of the login screen you were sent to
71
+ * 2. Run the login exactly as you would otherwise, adding `sso_state` to each request body and taking the value for
72
+ * the next request from the previous `202` response
73
+ * 3. On the `200` response, read `sso.continue_url`
74
+ * 4. Navigate the browser to `sso.continue_url` - a full page navigation, not a background fetch. It answers with a
75
+ * self-submitting form that delivers the signed `SAMLResponse` and the original `RelayState` to the service
76
+ * provider
77
+ * 5. The service provider validates the assertion and the user is signed in on their side
78
+ *
79
+ * On the `password_reset` leg the blob is **also** appended to `redirect_url` as a query parameter, alongside
80
+ * `return_url`. The browser follows that redirect and leaves the JSON body behind, so anything the remaining legs of
81
+ * the login still need has to ride the URL. Preserve the query string exactly as given.
82
+ *
83
+ * An invalid `sso_state` never fails a login. A forged, edited or expired blob is silently dropped and the request is
84
+ * then treated as an ordinary login, so valid credentials still return `200` - just with no `sso` object. Check for
85
+ * `sso` explicitly rather than reading `200` as proof the hand-off survived. When it is absent, do not retry with the
86
+ * same blob; the user has to start again from the service provider. See the
87
+ * [Login with Green Security](https://greensecurity.apidocumentation.com/guides/sso-login-with-green-security)
88
+ * guide for the service provider half of this flow.
52
89
  */
53
90
  export declare function useUsersPostAuthenticateMutation(options?: MutationHookOptions<UsersPostAuthenticateMutationData, UsersPostAuthenticateMutationError, UsersPostAuthenticateMutationVariables>): UseMutationResult<UsersPostAuthenticateMutationData, UsersPostAuthenticateMutationError, UsersPostAuthenticateMutationVariables>;
54
91
  export declare function mutationKeyUsersPostAuthenticate(): MutationKey;
@@ -1 +1 @@
1
- {"version":3,"file":"usersPostAuthenticate.d.ts","sourceRoot":"","sources":["../../../src/react-query/usersPostAuthenticate.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAEX,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,sCAAsC,GAAG;IACnD,OAAO,EAAE,UAAU,CAAC,2BAA2B,CAAC;IAChD,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAC3C,UAAU,CAAC,wBAAwB,CAAC;AAEtC,MAAM,MAAM,kCAAkC,GAC1C,MAAM,CAAC,gBAAgB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,CAAC,EAAE,mBAAmB,CAC3B,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,CACvC,GACA,iBAAiB,CAClB,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,CACvC,CAMA;AAED,wBAAgB,gCAAgC,IAAI,WAAW,CAE9D;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,iBAAiB,EAC1B,WAAW,CAAC,EAAE,cAAc,GAC3B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,CACV,SAAS,EAAE,sCAAsC,KAC9C,OAAO,CAAC,iCAAiC,CAAC,CAAC;CACjD,CA0BA"}
1
+ {"version":3,"file":"usersPostAuthenticate.d.ts","sourceRoot":"","sources":["../../../src/react-query/usersPostAuthenticate.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAEX,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,sCAAsC,GAAG;IACnD,OAAO,EAAE,UAAU,CAAC,2BAA2B,CAAC;IAChD,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAC3C,UAAU,CAAC,wBAAwB,CAAC;AAEtC,MAAM,MAAM,kCAAkC,GAC1C,MAAM,CAAC,gBAAgB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,CAAC,EAAE,mBAAmB,CAC3B,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,CACvC,GACA,iBAAiB,CAClB,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,CACvC,CAMA;AAED,wBAAgB,gCAAgC,IAAI,WAAW,CAE9D;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,iBAAiB,EAC1B,WAAW,CAAC,EAAE,cAAc,GAC3B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,CACV,SAAS,EAAE,sCAAsC,KAC9C,OAAO,CAAC,iCAAiC,CAAC,CAAC;CACjD,CA0BA"}
@@ -46,6 +46,43 @@ const _context_js_1 = require("./_context.js");
46
46
  * 3. Site redirects to your selected `return_url`
47
47
  * 4. The `user_token` will be appended as a query string parameter to your `return_url` - you must parse this token and store it
48
48
  * 5. Fetch the user object from `/users/me` using the token
49
+ *
50
+ * ## Finishing a "Login with Green Security" flow
51
+ *
52
+ * Green Security is also a SAML2 **identity provider**. When a third-party service provider sends a user to
53
+ * `/saml/idp/sso` to sign in with their Green Security account, the user lands on a Green Security login screen
54
+ * carrying an `sso_state` query string parameter. That parameter is a signed, five-minute record of which service
55
+ * provider is waiting, where its assertion consumer service lives, and what `RelayState` it sent.
56
+ *
57
+ * Authentication itself is unchanged - the user may still need a password, an MFA code, a magic link or a round trip
58
+ * to their own SAML IdP, and every `requires` value above applies as normal. The only difference is that you must
59
+ * echo `sso_state` back on **every** call in the sequence, unchanged, including the follow-up that carries the
60
+ * `mfa_code`.
61
+ *
62
+ * Each `202` response carries the verified blob back to you in its own top-level `sso_state` field. Send back the
63
+ * value from the response you just received rather than the one you started with. The two are normally the same
64
+ * string, but re-sending your original copy is how a blob the server has already rejected gets resent, and it forces
65
+ * you to hold login state you would otherwise not need.
66
+ *
67
+ * 1. Read `sso_state` from the query string of the login screen you were sent to
68
+ * 2. Run the login exactly as you would otherwise, adding `sso_state` to each request body and taking the value for
69
+ * the next request from the previous `202` response
70
+ * 3. On the `200` response, read `sso.continue_url`
71
+ * 4. Navigate the browser to `sso.continue_url` - a full page navigation, not a background fetch. It answers with a
72
+ * self-submitting form that delivers the signed `SAMLResponse` and the original `RelayState` to the service
73
+ * provider
74
+ * 5. The service provider validates the assertion and the user is signed in on their side
75
+ *
76
+ * On the `password_reset` leg the blob is **also** appended to `redirect_url` as a query parameter, alongside
77
+ * `return_url`. The browser follows that redirect and leaves the JSON body behind, so anything the remaining legs of
78
+ * the login still need has to ride the URL. Preserve the query string exactly as given.
79
+ *
80
+ * An invalid `sso_state` never fails a login. A forged, edited or expired blob is silently dropped and the request is
81
+ * then treated as an ordinary login, so valid credentials still return `200` - just with no `sso` object. Check for
82
+ * `sso` explicitly rather than reading `200` as proof the hand-off survived. When it is absent, do not retry with the
83
+ * same blob; the user has to start again from the service provider. See the
84
+ * [Login with Green Security](https://greensecurity.apidocumentation.com/guides/sso-login-with-green-security)
85
+ * guide for the service provider half of this flow.
49
86
  */
50
87
  function useUsersPostAuthenticateMutation(options) {
51
88
  const client = (0, _context_js_1.useGreenSecurityContext)();
@@ -1 +1 @@
1
- {"version":3,"file":"usersPostAuthenticate.js","sourceRoot":"","sources":["../../../src/react-query/usersPostAuthenticate.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAkFH,4EAgBC;AAED,4EAEC;AAED,gFAkCC;AAxID,uDAI+B;AAE/B,gFAA0E;AAC1E,wDAAsD;AActD,0CAA6C;AAC7C,+CAAwD;AAsBxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,SAAgB,gCAAgC,CAC9C,OAIC;IAMD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,yBAAW,EAAC;QACjB,GAAG,kCAAkC,CAAC,MAAM,EAAE,OAAO,CAAC;QACtD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,gCAAgC;IAC9C,OAAO,CAAC,+BAA+B,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACxE,CAAC;AAED,SAAgB,kCAAkC,CAChD,OAA0B,EAC1B,WAA4B;IAO5B,OAAO;QACL,WAAW,EAAE,gCAAgC,EAAE;QAC/C,UAAU,EAAE,SAAS,+BAA+B,CAAC,EACnD,OAAO,EACP,OAAO,GACR;YACC,MAAM,aAAa,GAAG;gBACpB,GAAG,WAAW;gBACd,GAAG,OAAO;gBACV,YAAY,EAAE;oBACZ,GAAG,WAAW,EAAE,YAAY;oBAC5B,GAAG,OAAO,EAAE,YAAY;oBACxB,MAAM,EAAE,IAAA,8BAAc,EACpB,WAAW,EAAE,YAAY,EAAE,MAAM,EACjC,OAAO,EAAE,YAAY,EAAE,MAAM,CAC9B;iBACF;aACF,CAAC;YACF,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"usersPostAuthenticate.js","sourceRoot":"","sources":["../../../src/react-query/usersPostAuthenticate.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAuHH,4EAgBC;AAED,4EAEC;AAED,gFAkCC;AA7KD,uDAI+B;AAE/B,gFAA0E;AAC1E,wDAAsD;AActD,0CAA6C;AAC7C,+CAAwD;AAsBxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,SAAgB,gCAAgC,CAC9C,OAIC;IAMD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,yBAAW,EAAC;QACjB,GAAG,kCAAkC,CAAC,MAAM,EAAE,OAAO,CAAC;QACtD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,gCAAgC;IAC9C,OAAO,CAAC,+BAA+B,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACxE,CAAC;AAED,SAAgB,kCAAkC,CAChD,OAA0B,EAC1B,WAA4B;IAO5B,OAAO;QACL,WAAW,EAAE,gCAAgC,EAAE;QAC/C,UAAU,EAAE,SAAS,+BAA+B,CAAC,EACnD,OAAO,EACP,OAAO,GACR;YACC,MAAM,aAAa,GAAG;gBACpB,GAAG,WAAW;gBACd,GAAG,OAAO;gBACV,YAAY,EAAE;oBACZ,GAAG,WAAW,EAAE,YAAY;oBAC5B,GAAG,OAAO,EAAE,YAAY;oBACxB,MAAM,EAAE,IAAA,8BAAc,EACpB,WAAW,EAAE,YAAY,EAAE,MAAM,EACjC,OAAO,EAAE,YAAY,EAAE,MAAM,CAC9B;iBACF;aACF,CAAC;YACF,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -100,6 +100,43 @@ export declare class Users extends ClientSDK {
100
100
  * 3. Site redirects to your selected `return_url`
101
101
  * 4. The `user_token` will be appended as a query string parameter to your `return_url` - you must parse this token and store it
102
102
  * 5. Fetch the user object from `/users/me` using the token
103
+ *
104
+ * ## Finishing a "Login with Green Security" flow
105
+ *
106
+ * Green Security is also a SAML2 **identity provider**. When a third-party service provider sends a user to
107
+ * `/saml/idp/sso` to sign in with their Green Security account, the user lands on a Green Security login screen
108
+ * carrying an `sso_state` query string parameter. That parameter is a signed, five-minute record of which service
109
+ * provider is waiting, where its assertion consumer service lives, and what `RelayState` it sent.
110
+ *
111
+ * Authentication itself is unchanged - the user may still need a password, an MFA code, a magic link or a round trip
112
+ * to their own SAML IdP, and every `requires` value above applies as normal. The only difference is that you must
113
+ * echo `sso_state` back on **every** call in the sequence, unchanged, including the follow-up that carries the
114
+ * `mfa_code`.
115
+ *
116
+ * Each `202` response carries the verified blob back to you in its own top-level `sso_state` field. Send back the
117
+ * value from the response you just received rather than the one you started with. The two are normally the same
118
+ * string, but re-sending your original copy is how a blob the server has already rejected gets resent, and it forces
119
+ * you to hold login state you would otherwise not need.
120
+ *
121
+ * 1. Read `sso_state` from the query string of the login screen you were sent to
122
+ * 2. Run the login exactly as you would otherwise, adding `sso_state` to each request body and taking the value for
123
+ * the next request from the previous `202` response
124
+ * 3. On the `200` response, read `sso.continue_url`
125
+ * 4. Navigate the browser to `sso.continue_url` - a full page navigation, not a background fetch. It answers with a
126
+ * self-submitting form that delivers the signed `SAMLResponse` and the original `RelayState` to the service
127
+ * provider
128
+ * 5. The service provider validates the assertion and the user is signed in on their side
129
+ *
130
+ * On the `password_reset` leg the blob is **also** appended to `redirect_url` as a query parameter, alongside
131
+ * `return_url`. The browser follows that redirect and leaves the JSON body behind, so anything the remaining legs of
132
+ * the login still need has to ride the URL. Preserve the query string exactly as given.
133
+ *
134
+ * An invalid `sso_state` never fails a login. A forged, edited or expired blob is silently dropped and the request is
135
+ * then treated as an ordinary login, so valid credentials still return `200` - just with no `sso` object. Check for
136
+ * `sso` explicitly rather than reading `200` as proof the hand-off survived. When it is absent, do not retry with the
137
+ * same blob; the user has to start again from the service provider. See the
138
+ * [Login with Green Security](https://greensecurity.apidocumentation.com/guides/sso-login-with-green-security)
139
+ * guide for the service provider half of this flow.
103
140
  */
104
141
  postAuthenticate(request: operations.PostAuthenticateRequestBody, options?: RequestOptions): Promise<operations.PostAuthenticateResponse>;
105
142
  /**