-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
B2B-1354: [update] add security details and cleanup (#562)
<!-- Ticket number or summary of work --> # [B2B-1354] ## What changed? Added security information and clean up ## Release notes draft <!-- Provide an entry for the release notes using simple, conversational language. Don't be too technical. Explain how the change will benefit the merchant and link to the feature. Examples: * The newly-released [X feature] is now available to use. Now, you’ll be able to [perform Y action]. * We're happy to announce [X feature], which can help you [perform Y action]. * [X feature] helps you to create [Y response] using the [Z query parameter]. Now, you can deliver [ex, localized shopping experiences for your customers]. * Fixed a bug in the [X endpoint]. Now the [Y field] will appear when you click [Z option]. --> * ## Anything else? <!-- Add related PRs, salient notes, additional ticket numbers, etc. --> ping {names} [B2B-1354]: https://bigcommercecloud.atlassian.net/browse/B2B-1354?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Loading branch information
1 parent
d9c52e8
commit 27c98f4
Showing
15 changed files
with
704 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ openapi: '3.0.0' | |
info: | ||
title: authentication | ||
version: '3.0' | ||
description: Api auth manage | ||
description: API auth manage | ||
servers: | ||
- url: 'https://api-b2b.bigcommerce.com/api/io' | ||
tags: | ||
|
@@ -12,7 +12,7 @@ paths: | |
/auth/backend: | ||
parameters: [] | ||
post: | ||
summary: Get Server to Server OpenAPI tokens | ||
summary: Get Server to Server Tokens | ||
operationId: post-auth-backend | ||
tags: | ||
- Auth | ||
|
@@ -108,14 +108,14 @@ paths: | |
email: | ||
type: string | ||
minLength: 1 | ||
description: 'Backend user email, the credential you use to log in B2B Edition APP' | ||
description: 'You can use the backend user email to log into the B2B Edition APP.' | ||
password: | ||
type: string | ||
minLength: 1 | ||
description: 'Backend user password, the credential you use to log in B2B Edition APP' | ||
description: 'You can use the backend user password to log into the B2B Edition APP.' | ||
name: | ||
type: string | ||
description: The token name if you want specfiy | ||
description: The token name, if you want to specify it. | ||
required: | ||
- storeHash | ||
|
@@ -153,10 +153,10 @@ paths: | |
email: [email protected] | ||
password: 1mdsafu3nf9x | ||
description: '' | ||
description: Get Server to Server OpenAPI tokens | ||
description: Get Server to Server tokens | ||
security: [] | ||
delete: | ||
summary: Delete Backend OpenAPI tokens | ||
summary: Delete Backend API tokens | ||
operationId: delete-auth-backend | ||
responses: | ||
'200': | ||
|
@@ -212,7 +212,7 @@ paths: | |
errMsg: No matching token was found | ||
meta: | ||
message: Not Found Error | ||
description: Delete backend OpenAPI tokens. | ||
description: Delete backend API tokens. | ||
security: | ||
- authToken: [] | ||
requestBody: | ||
|
@@ -224,7 +224,7 @@ paths: | |
email: | ||
type: string | ||
description: | | ||
Backend user email, the credential you use to log in B2B Edition APP. Which will be used as a query parameter. | ||
The backend user email is the credential you use to log into the B2B Edition APP, which will be used as a query parameter. | ||
minLength: 1 | ||
name: | ||
type: string | ||
|
@@ -273,7 +273,7 @@ paths: | |
description: Token | ||
eventChannel: | ||
type: string | ||
description: 'The channel that token created from app,admin or api.' | ||
description: 'The channel of the token created from an app, admin or API.' | ||
meta: | ||
type: object | ||
properties: | ||
|
@@ -323,7 +323,7 @@ paths: | |
example-1: | ||
value: {} | ||
operationId: get-backend-tokens | ||
description: Get all Server to Server OpenAPI tokens | ||
description: Get all Server to Server tokens | ||
parameters: | ||
- schema: | ||
type: integer | ||
|
@@ -339,7 +339,7 @@ paths: | |
description: Pagination offset | ||
/auth/storefront: | ||
get: | ||
summary: Get a StoreFront OpenAPI AuthToken | ||
summary: Get a Storefront API AuthToken | ||
tags: | ||
- Auth | ||
responses: | ||
|
@@ -410,7 +410,7 @@ paths: | |
meta: | ||
message: Invalid token header. No credentials provided. | ||
operationId: get-auth-storefront | ||
description: Get a storeFront openAPI authToken | ||
description: Get a storefront API authToken | ||
parameters: | ||
- schema: | ||
type: string | ||
|
@@ -422,11 +422,11 @@ paths: | |
type: string | ||
in: query | ||
name: channelId | ||
description: The BigCommerce channel id. Do not use this parameter if you do not have opened multi-storefront | ||
description: The BigCommerce channel ID. Do not use this parameter if you do not have an opened multi-storefront. | ||
security: [] | ||
/auth/customers: | ||
post: | ||
summary: Get StoreFront authToken with Credentials | ||
summary: Get Storefront authToken with Credentials | ||
operationId: post-auth-customer | ||
responses: | ||
'200': | ||
|
@@ -512,11 +512,11 @@ paths: | |
description: BC customer password | ||
channelId: | ||
type: number | ||
description: BigCommerce channel id | ||
description: BigCommerce channel ID | ||
name: | ||
type: string | ||
minLength: 1 | ||
description: The token name if you want to specfiy | ||
description: The token name, if you want to specify it. | ||
required: | ||
- storeHash | ||
|
@@ -534,7 +534,7 @@ paths: | |
beginAt: 1000 | ||
endAt: 1721930486 | ||
description: '' | ||
description: BC customer get a authentication token | ||
description: BigCommerce customer gets an authentication token | ||
tags: | ||
- Auth | ||
security: [] | ||
|
@@ -580,10 +580,10 @@ paths: | |
properties: | ||
customerId: | ||
type: integer | ||
description: BigCommerce customer id. | ||
description: BigCommerce customer ID | ||
channelId: | ||
type: integer | ||
description: BigCommerce channel id | ||
description: BigCommerce channel ID | ||
required: | ||
- customerId | ||
examples: | ||
|
@@ -598,6 +598,8 @@ components: | |
securitySchemes: | ||
authToken: | ||
name: authToken | ||
description: |- | ||
Required to authenticate requests. Include the token in a header parameter called `authToken`. | ||
type: apiKey | ||
in: header | ||
security: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: channel | ||
title: Channel | ||
version: '1.0' | ||
description: Related with BigCommerce store channels. Only support 'bigcommerce' paltform and 'storefront' type. | ||
description: Related with BigCommerce store channels. Only support 'bigcommerce' platform and 'storefront' type. | ||
contact: | ||
name: BigCommerce | ||
url: 'https://www.bigcommerce.com' | ||
email: [email protected] | ||
servers: | ||
- url: 'https://api-b2b.bigcommerce.com/api/v3/io' | ||
paths: | ||
|
@@ -72,11 +76,11 @@ paths: | |
value: | ||
code: 422 | ||
data: | ||
errMsg: Multi storefront is not enabled | ||
errMsg: Multi-storefront is not enabled | ||
meta: | ||
message: Multi storefront is not enabled | ||
message: Multi-storefront is not enabled | ||
operationId: get-channels | ||
description: get store chennels | ||
description: get store channels | ||
security: | ||
- authToken: [] | ||
'/channels/{channelId}': | ||
|
@@ -86,7 +90,7 @@ paths: | |
name: channelId | ||
in: path | ||
required: true | ||
description: BigCommerce channel id | ||
description: BigCommerce channel ID | ||
get: | ||
summary: Get a store channel | ||
tags: | ||
|
@@ -127,7 +131,7 @@ paths: | |
meta: | ||
message: SUCCESS | ||
operationId: get-channels-channelId | ||
description: Get a store chennel | ||
description: Get a store channel | ||
components: | ||
schemas: | ||
Channel: | ||
|
@@ -148,28 +152,28 @@ components: | |
properties: | ||
id: | ||
type: number | ||
description: B2B Edition channel id | ||
description: B2B Edition channel ID | ||
channelId: | ||
type: number | ||
description: BigCommerce channel id | ||
description: BigCommerce channel ID | ||
channelName: | ||
type: string | ||
minLength: 1 | ||
description: Channel name | ||
createdAt: | ||
type: number | ||
description: The time stamp channel was created | ||
description: The timestamp when you created the channel. | ||
updatedAt: | ||
type: number | ||
description: The time stamp channel was updated | ||
description: The timestamp when you updated the channel. | ||
type: | ||
type: string | ||
minLength: 1 | ||
description: 'The channel type, only support "storefront" now.' | ||
description: 'The channel type only supports "storefront" now.' | ||
platform: | ||
type: string | ||
minLength: 1 | ||
description: 'The channel platform, only support "bigcommerce" now' | ||
description: 'The channel platform only supports "bigcommerce" now.' | ||
status: | ||
type: string | ||
minLength: 1 | ||
|
@@ -183,7 +187,7 @@ components: | |
site: | ||
type: string | ||
minLength: 1 | ||
description: ' The domain associated with a channel' | ||
description: ' The domain associated with a channel.' | ||
isVisible: | ||
type: boolean | ||
isEnabled: | ||
|
@@ -204,6 +208,7 @@ components: | |
securitySchemes: | ||
authToken: | ||
name: authToken | ||
description: Required to authenticate requests. Include the token in a header parameter called `authToken`. | ||
type: apiKey | ||
in: header | ||
tags: | ||
|
Oops, something went wrong.