Skip to content

Commit

Permalink
feat: rename http client auth authorizationToken to accessToken
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyentoanit committed Apr 4, 2020
1 parent 8a15dd8 commit 7a230da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/http-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { apiErrorFactory, NullError, InvalidProgramStateError } from './errors'
import gunzip from './gunzip'

export interface HttpClientAuth {
authorizationToken: string
accessToken: string
clientId: string
scope: number
}
Expand All @@ -32,7 +32,7 @@ export class HttpClient {
const headers = new Headers({
'Content-Type': JSON_CONTENT_TYPE,
Accept: JSON_CONTENT_TYPE,
Authorization: `Bearer ${this.auth.authorizationToken}`,
Authorization: `Bearer ${this.auth.accessToken}`,
'Amazon-Advertising-API-ClientId': this.auth.clientId,
'User-Agent': USER_AGENT,
})
Expand Down
2 changes: 1 addition & 1 deletion test/http-client-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SANDBOX = true
export const SANDBOX_URI = 'https://advertising-api-test.amazon.com'

export const auth: HttpClientAuth = {
authorizationToken: config.TEST_ACCESS_TOKEN || '',
accessToken: config.TEST_ACCESS_TOKEN || '',
clientId: config.TEST_CLIENT_ID || '',
scope: config.TEST_SCOPE || -1,
}
Expand Down

1 comment on commit 7a230da

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.