diff --git a/packages/insomnia-app/app/network/__tests__/network.test.js b/packages/insomnia-app/app/network/__tests__/network.test.js index a11808917..44ecf7c48 100644 --- a/packages/insomnia-app/app/network/__tests__/network.test.js +++ b/packages/insomnia-app/app/network/__tests__/network.test.js @@ -617,7 +617,7 @@ describe('_getAwsAuthHeaders', () => { .toMatch(/^\d{8}T\d{6}Z$/); expect(filterHeaders(headers, 'host')[0].value).toEqual('ec2.us-west-2.amazonaws.com'); expect(filterHeaders(headers, 'authorization')[0].value) - .toMatch(/^AWS4-HMAC-SHA256 Credential=AKIA99999999\/20180430\/us-west-2\/ec2\/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=[a-z0-9]*$/); + .toMatch(/^AWS4-HMAC-SHA256 Credential=AKIA99999999\/\d{8}\/us-west-2\/ec2\/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=[a-z0-9]*$/); expect(filterHeaders(headers, 'content-type')) .toHaveLength(0); }); @@ -656,7 +656,7 @@ describe('_getAwsAuthHeaders', () => { .toMatch(/^\d{8}T\d{6}Z$/); expect(filterHeaders(headers, 'host')[0].value).toEqual('example.com'); expect(filterHeaders(headers, 'authorization')[0].value) - .toMatch(/^AWS4-HMAC-SHA256 Credential=AKIA99999999\/20180430\/us-west-2\/ec2\/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token, Signature=[a-z0-9]*$/); + .toMatch(/^AWS4-HMAC-SHA256 Credential=AKIA99999999\/\d{8}\/us-west-2\/ec2\/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token, Signature=[a-z0-9]*$/); expect(filterHeaders(headers, 'content-type')) .toHaveLength(0); }); diff --git a/packages/insomnia-app/app/ui/components/editors/auth/o-auth-1-auth.js b/packages/insomnia-app/app/ui/components/editors/auth/o-auth-1-auth.js index ba0a38254..6c7ad5c50 100644 --- a/packages/insomnia-app/app/ui/components/editors/auth/o-auth-1-auth.js +++ b/packages/insomnia-app/app/ui/components/editors/auth/o-auth-1-auth.js @@ -4,7 +4,6 @@ import * as React from 'react'; import classnames from 'classnames'; import autobind from 'autobind-decorator'; import OneLineEditor from '../../codemirror/one-line-editor'; -import * as misc from '../../../../common/misc'; import HelpTooltip from '../../help-tooltip'; import { SIGNATURE_METHOD_HMAC_SHA1, diff --git a/packages/insomnia-app/app/ui/components/editors/auth/o-auth-2-auth.js b/packages/insomnia-app/app/ui/components/editors/auth/o-auth-2-auth.js index a6724e38d..d55874d0e 100644 --- a/packages/insomnia-app/app/ui/components/editors/auth/o-auth-2-auth.js +++ b/packages/insomnia-app/app/ui/components/editors/auth/o-auth-2-auth.js @@ -6,8 +6,15 @@ import * as React from 'react'; import classnames from 'classnames'; import autobind from 'autobind-decorator'; import OneLineEditor from '../../codemirror/one-line-editor'; -import * as misc from '../../../../common/misc'; -import {GRANT_TYPE_AUTHORIZATION_CODE, GRANT_TYPE_CLIENT_CREDENTIALS, GRANT_TYPE_IMPLICIT, GRANT_TYPE_PASSWORD, RESPONSE_TYPE_ID_TOKEN, RESPONSE_TYPE_ID_TOKEN_TOKEN, RESPONSE_TYPE_TOKEN} from '../../../../network/o-auth-2/constants'; +import { + GRANT_TYPE_AUTHORIZATION_CODE, + GRANT_TYPE_CLIENT_CREDENTIALS, + GRANT_TYPE_IMPLICIT, + GRANT_TYPE_PASSWORD, + RESPONSE_TYPE_ID_TOKEN, + RESPONSE_TYPE_ID_TOKEN_TOKEN, + RESPONSE_TYPE_TOKEN +} from '../../../../network/o-auth-2/constants'; import authorizationUrls from '../../../../datasets/authorization-urls'; import accessTokenUrls from '../../../../datasets/access-token-urls'; import getAccessToken from '../../../../network/o-auth-2/get-token';