Commit e4e2996
committed
feat: add OAUTH branch to auth credential verify
Adds the OAUTH branch to `AuthCredentialVerifyRequestOneOf`, completing the create + verify flow for OIDC-backed authentication credentials on Embedded Wallet internal accounts.
**Request shape**
- `POST /auth/credentials/{id}/verify` body: `{ type: "OAUTH", oidcToken, clientPublicKey }` → 200 `AuthSession`.
- `{id}` is the `AuthMethod.id` returned from `POST /auth/credentials`.
**Schemas added**
- `OauthCredentialVerifyRequestFields` — `{ type: "OAUTH", oidcToken, clientPublicKey }` (variant single-value enum on `type`).
- `OauthCredentialVerifyRequest` — `allOf(AuthCredentialVerifyRequest, OauthCredentialVerifyRequestFields)`.
**Wire-up**
- `AuthCredentialVerifyRequestOneOf.yaml` discriminator map extended with `OAUTH → OauthCredentialVerifyRequest`.
- OAuth example added on `POST /auth/credentials/{id}/verify`.
- Endpoint description updated to cover the OAuth verify path, including its double-duty as the reauth path after a prior session expired.
- 401 response description extended to cover OIDC validation failures (signature / issuer / `iat` freshness).
- `.stainless/stainless.yml` registers the two new schemas and extends the "remove allOf $ref to AuthCredentialVerifyRequest" transform target list to include `OauthCredentialVerifyRequest.allOf[0]`.
**OIDC constraints (documented on the `oidcToken` field)**
- Fresh token required on every verify: `iat` must be less than 60 seconds before the request timestamp.
- Grid re-validates the signature against the issuer's `.well-known` configuration on each verify.
**Notes**
- Pairs with `04-21-feat_add_oauth_branch_to_auth_credential_create` (the prior PR in the stack); together they make OAuth credentials usable end-to-end. The additional-credential challenge flow gets its own OAUTH branch in the next PR in the stack.
- Bundled `openapi.yaml` and `mintlify/openapi.yaml` regenerated via `make build`.1 parent ca6461a commit e4e2996
7 files changed
Lines changed: 136 additions & 10 deletions
File tree
- .stainless
- mintlify
- openapi
- components/schemas/auth
- paths/auth
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
| 350 | + | |
349 | 351 | | |
350 | 352 | | |
351 | 353 | | |
| |||
857 | 859 | | |
858 | 860 | | |
859 | 861 | | |
| 862 | + | |
860 | 863 | | |
861 | 864 | | |
862 | 865 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| |||
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
| |||
52 | 65 | | |
53 | 66 | | |
54 | 67 | | |
55 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
56 | 72 | | |
57 | 73 | | |
58 | 74 | | |
| |||
0 commit comments