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

Commit 80a8b1c

Browse files
committed
Merge pull request #518 from appirio-tech/SUP-2432-arena-auth
Check tcsso token when checking if user is authenticated
2 parents 9060bd0 + 4d50710 commit 80a8b1c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/services/authtoken.service.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
function AuthTokenService(CONSTANTS, $cookies, $location, store, $http, $log, jwtHelper, $q) {
99
var v2TokenKey = 'tcjwt';
10+
var v2TCSSOTokenKey = 'tcsso'
1011
var v3TokenKey = 'appiriojwt';
1112
// use this api url over CONSTANTS
1213
var apiUrl = CONSTANTS.AUTH_API_URL || CONSTANTS.API_URL;
@@ -15,6 +16,7 @@
1516
setV3Token: setV3Token,
1617
getV2Token: getV2Token,
1718
getV3Token: getV3Token,
19+
getTCSSOToken: getTCSSOToken,
1820
removeTokens: removeTokens,
1921
refreshV3Token: refreshV3Token,
2022
exchangeToken: exchangeToken,
@@ -37,6 +39,10 @@
3739
return $cookies.get(v2TokenKey);
3840
}
3941

42+
function getTCSSOToken() {
43+
return $cookies.get(v2TCSSOTokenKey);
44+
}
45+
4046
function removeTokens() {
4147
// remove tokens
4248
// need to provide domain when removing cookie

app/services/tcAuth.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
}
178178

179179
function isAuthenticated() {
180-
return !!AuthTokenService.getV3Token() && !!AuthTokenService.getV2Token();
180+
return !!AuthTokenService.getV3Token() && !!AuthTokenService.getV2Token() && !!AuthTokenService.getTCSSOToken();
181181
}
182182

183183
}

0 commit comments

Comments
 (0)