Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .stainless/stainless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ resources:
email_otp_credential_verify_request_fields: '#/components/schemas/EmailOtpCredentialVerifyRequestFields'
email_otp_credential_additional_challenge: '#/components/schemas/EmailOtpCredentialAdditionalChallenge'
email_otp_credential_additional_challenge_fields: '#/components/schemas/EmailOtpCredentialAdditionalChallengeFields'
oauth_credential_create_request: '#/components/schemas/OauthCredentialCreateRequest'
oauth_credential_create_request_fields: '#/components/schemas/OauthCredentialCreateRequestFields'
exchange_rates:
methods:
list:
Expand Down
30 changes: 29 additions & 1 deletion mintlify/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
oneOf:
- $ref: ./EmailOtpCredentialCreateRequest.yaml
- $ref: ./OauthCredentialCreateRequest.yaml
discriminator:
propertyName: type
mapping:
EMAIL_OTP: ./EmailOtpCredentialCreateRequest.yaml
OAUTH: ./OauthCredentialCreateRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: OAuth Credential Create Request
allOf:
- $ref: ./AuthCredentialCreateRequest.yaml
- $ref: ./OauthCredentialCreateRequestFields.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type: object
required:
- type
- oidcToken
properties:
type:
type: string
enum:
- OAUTH
description: Discriminator value identifying this as an OAuth credential.
oidcToken:
type: string
description: >-
OIDC ID token issued by the identity provider (e.g. Google, Apple).
Grid fetches the issuer's signing key from the `iss` claim's
`.well-known` OpenID configuration and verifies the token signature.
The token's `iat` claim must be less than 60 seconds before the
request timestamp.
example: eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJzdWIiOiIxMTIyMzM0NDU1IiwiYXVkIjoiMTIzNDU2Ny5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImVtYWlsIjoidXNlckBleGFtcGxlLmNvbSIsImlhdCI6MTc0NjczNjUwOSwiZXhwIjoxNzQ2NzQwMTA5fQ.signature
12 changes: 11 additions & 1 deletion openapi/paths/auth/auth_credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ post:
credentials, this call also triggers a one-time password email to the
address on the customer record tied to the internal account; the
credential must be activated via `POST /auth/credentials/{id}/verify`
before it can sign requests.
before it can sign requests. For `OAUTH` credentials, the supplied
`oidcToken` is validated inline against the issuer's `.well-known`
OpenID configuration (the token's `iat` must be less than 60 seconds
before the request); activation still happens via
`POST /auth/credentials/{id}/verify`.
Comment thread
DhruvPareek marked this conversation as resolved.


**Adding an additional credential**
Expand Down Expand Up @@ -74,6 +78,12 @@ post:
value:
type: EMAIL_OTP
accountId: InternalAccount:019542f5-b3e7-1d02-0000-000000000002
oauth:
summary: Register an OAuth credential
value:
type: OAUTH
accountId: InternalAccount:019542f5-b3e7-1d02-0000-000000000002
oidcToken: eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJzdWIiOiIxMTIyMzM0NDU1IiwiYXVkIjoiMTIzNDU2Ny5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImVtYWlsIjoidXNlckBleGFtcGxlLmNvbSIsImlhdCI6MTc0NjczNjUwOSwiZXhwIjoxNzQ2NzQwMTA5fQ.signature
responses:
'201':
description: Authentication credential created successfully
Expand Down
Loading