Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 6265f87

Browse files
author
vikasrohit
committed
AS#100297043256582, Move all login to link of Members to accounts.topcoder.com
-- Debug statements
1 parent 863b54a commit 6265f87

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

app/services/jwtInterceptor.service.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { isTokenExpired, getFreshToken } from 'tc-accounts'
1616
////////////
1717

1818
function _checkAndRefreshToken(config, token) {
19-
logger.debug("_checkAndRefreshToken: " + config.url + ", " + + token)
19+
logger.debug('_checkAndRefreshToken: ' + config.url + ', ' + + token)
2020
if (isTokenExpired(token)) {
2121
logger.debug(String.supplant('Token has expired, attempting to refreshToken() for "{url}"', config))
2222

@@ -34,7 +34,7 @@ import { isTokenExpired, getFreshToken } from 'tc-accounts'
3434
return null
3535
})
3636
} else {
37-
logger.debug("returning token " + token)
37+
logger.debug('returning token ' + token)
3838
return token
3939
}
4040
}
@@ -56,11 +56,11 @@ import { isTokenExpired, getFreshToken } from 'tc-accounts'
5656
for (var i = 0; i < haveItAddItEndpoints.length; i++) {
5757
var obj = haveItAddItEndpoints[i]
5858
var re = new RegExp(obj.url)
59-
logger.debug("haveItAddItEndpoints[" + i + "]=" + obj.url + " ===> config.url=" + config.url)
59+
logger.debug('haveItAddItEndpoints[' + i + ']=' + obj.url + ' ===> config.url=' + config.url)
6060
if (config.method.toUpperCase() === obj.method && re.test(config.url)) {
61-
logger.debug("checking for authentication")
61+
logger.debug('checking for authentication')
6262
if (TcAuthService.isAuthenticated()) {
63-
logger.debug("found authenticated")
63+
logger.debug('found authenticated')
6464
var token = null
6565
if (config.url.indexOf('v2/') > -1 ||
6666
config.url.indexOf('memberCert') > -1 ||
@@ -69,7 +69,7 @@ import { isTokenExpired, getFreshToken } from 'tc-accounts'
6969
} else {
7070
token = getCurrentUser() !== null ? getCurrentUser().token : null
7171
}
72-
logger.debug("found token: " + token)
72+
logger.debug('found token: ' + token)
7373
return _checkAndRefreshToken(config, token)
7474
}
7575
// else
@@ -81,9 +81,9 @@ import { isTokenExpired, getFreshToken } from 'tc-accounts'
8181
// for everything else assume that we need to send token
8282
var idToken = config.url.indexOf('v2/') > -1 ? AuthTokenService.getV2Token() : (getCurrentUser() !== null ? getCurrentUser().token : null)
8383

84-
logger.debug("idToken: " + idToken)
84+
logger.debug('idToken: ' + idToken)
8585
if (!TcAuthService.isAuthenticated() || idToken == null) {
86-
logger.debug("redirecting to accounts app")
86+
logger.debug('redirecting to accounts app')
8787
var retUrl = CONSTANTS.MAIN_URL + '/?next=' + config.url
8888
$window.location = CONSTANTS.ACCOUNTS_APP_URL + '?retUrl=' + encodeURIComponent(retUrl)
8989
return

0 commit comments

Comments
 (0)