Skip to content

Commit fc923a6

Browse files
author
Sachin Maheshwari
committed
RS256 token changes
1 parent 4eed324 commit fc923a6

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

__tests__/reducers/auth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const mockActions = {
2020
jest.setMock(require.resolve('actions/auth'), mockActions);
2121
jest.setMock(require.resolve('actions/profile'), mockActions);
2222

23-
jest.setMock('tc-accounts', {
23+
jest.setMock('@topcoder-platform/tc-auth-lib', {
2424
decodeToken: () => 'User object',
2525
isTokenExpired: () => false,
2626
});

__tests__/reducers/challenge.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const mockSmpActions = {
4444
};
4545
_.merge(actions, mockSmpActions);
4646

47-
jest.setMock('tc-accounts', {
47+
jest.setMock('@topcoder-platform/tc-auth-lib', {
4848
decodeToken: () => 'User object',
4949
isTokenExpired: () => false,
5050
});

config/jest/setup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* global jest */
22
require('topcoder-react-utils/config/jest/setup');
33

4-
jest.setMock('tc-accounts', {
4+
jest.setMock('@topcoder-platform/tc-auth-lib', {
55
decodeToken: token => (token ? {
66
handle: 'username12345',
77
userId: '12345',

config/webpack/default.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222
'redux',
2323
'redux-actions',
2424
'isomorphic-fetch',
25-
'tc-accounts',
25+
'@topcoder-platform/tc-auth-lib',
2626
'to-capital-case',
2727
'topcoder-react-utils',
2828
'tc-core-library-js',

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"react-redux": "^6.0.1",
4848
"redux": "^3.7.2",
4949
"redux-actions": "^2.4.0",
50-
"tc-accounts": "https://github.com/appirio-tech/accounts-app.git#dev",
5150
"tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6",
5251
"to-capital-case": "^1.0.0",
5352
"topcoder-react-utils": "0.7.5"
@@ -104,6 +103,7 @@
104103
"webpack-dev-middleware": "^3.1.3",
105104
"webpack-hot-middleware": "^2.22.2",
106105
"webpack-merge": "^4.1.3",
107-
"webpack-stats-plugin": "^0.2.1"
106+
"webpack-stats-plugin": "^0.2.1",
107+
"@topcoder-platform/tc-auth-lib": "^1.0.0"
108108
}
109109
}

src/actions/auth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import { createActions } from 'redux-actions';
7-
import { decodeToken } from 'tc-accounts';
7+
import { decodeToken } from '@topcoder-platform/tc-auth-lib';
88
import { getApiV3, getApiV5 } from '../services/api';
99

1010
/**

src/actions/challenge.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import _ from 'lodash';
88
import { config } from 'topcoder-react-utils';
99
import { createActions } from 'redux-actions';
10-
import { decodeToken } from 'tc-accounts';
10+
import { decodeToken } from '@topcoder-platform/tc-auth-lib';
1111
import { getService as getChallengesService } from '../services/challenges';
1212
import { getService as getSubmissionService } from '../services/submissions';
1313
import { getApi } from '../services/api';

src/reducers/auth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
import _ from 'lodash';
16-
import { decodeToken } from 'tc-accounts';
16+
import { decodeToken } from '@topcoder-platform/tc-auth-lib';
1717
import { redux } from 'topcoder-react-utils';
1818
import actions from '../actions/auth';
1919
import profileActions from '../actions/profile';

src/reducers/direct.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import _ from 'lodash';
88
import { handleActions } from 'redux-actions';
9-
import { decodeToken } from 'tc-accounts';
9+
import { decodeToken } from '@topcoder-platform/tc-auth-lib';
1010
import actions from '../actions/direct';
1111
import logger from '../utils/logger';
1212
import { fireErrorMessage } from '../utils/errors';

src/services/challenges.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import _ from 'lodash';
88
import moment from 'moment';
99
import qs from 'qs';
10-
import { decodeToken } from 'tc-accounts';
10+
import { decodeToken } from '@topcoder-platform/tc-auth-lib';
1111
import logger from '../utils/logger';
1212
import { setErrorIcon, ERROR_ICON_TYPES } from '../utils/errors';
1313
import { COMPETITION_TRACKS, getApiResponsePayload } from '../utils/tc';

src/services/members.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/* global XMLHttpRequest */
88
import _ from 'lodash';
99
import qs from 'qs';
10-
import { decodeToken } from 'tc-accounts';
10+
import { decodeToken } from '@topcoder-platform/tc-auth-lib';
1111
import logger from '../utils/logger';
1212
import { getApiResponsePayload } from '../utils/tc';
1313
import { getApi } from './api';

0 commit comments

Comments
 (0)