@lovrozagar/oat 0.5.0 → 0.6.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.
@@ -35,6 +35,16 @@ function signUp(label: string): AuthFlow {
35
35
  return {
36
36
  credentialFrom: "$.access_token",
37
37
  expiresInFrom: "$.access_token_expires_in",
38
+ refresh: {
39
+ steps: [
40
+ {
41
+ body: { refresh_token: "{refreshToken}" },
42
+ method: "POST",
43
+ path: "/v1/auth/refresh",
44
+ saveAs: { credential: "$.access_token", refreshToken: "$.refresh_token" },
45
+ },
46
+ ],
47
+ },
38
48
  steps: [
39
49
  /* Raw paths rather than operationIds: an API document like this commonly contains no
40
50
  * auth operations at all, so there is nothing in the spec to reference. `oat doctor`
@@ -52,7 +62,7 @@ function signUp(label: string): AuthFlow {
52
62
  body: { token: "{verifyToken}" },
53
63
  method: "POST",
54
64
  path: "/v1/auth/email/verify",
55
- saveAs: { credential: "$.access_token" },
65
+ saveAs: { credential: "$.access_token", refreshToken: "$.refresh_token" },
56
66
  /* The credential names the org and project registration just provisioned. */
57
67
  saveClaimsFrom: {
58
68
  bind: { orgId: "orgs.0.oid", projectId: "orgs.0.pids.0" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrozagar/oat",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "OpenAPI Tester — matrix-test a live API against its OpenAPI spec",
5
5
  "keywords": [
6
6
  "api",