15768: collection copy dialog mostly works Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
[arvados-workbench2.git] / src / store / auth / auth-action-session.ts
index fcb537c1647ddcee3a04e0be5d1a5e9355b05998..7e81f2d952ebed3bf81353a4e6a6e2518a91044d 100644 (file)
@@ -18,7 +18,7 @@ import { Session, SessionStatus } from "models/session";
 import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
 import { AuthService } from "services/auth-service/auth-service";
 import { snackbarActions, SnackbarKind } from "store/snackbar/snackbar-actions";
-import * as jsSHA from "jssha";
+import jsSHA from "jssha";
 
 const getClusterConfig = async (origin: string, apiClient: AxiosInstance): Promise<Config | null> => {
     let configFromDD: Config | undefined;
@@ -99,7 +99,7 @@ export const getSaltedToken = (clusterId: string, token: string) => {
         throw new Error(invalidV2Token);
     }
     let salted = secret;
-    if (uuid.substr(0, 5) !== clusterId) {
+    if (uuid.substring(0, 5) !== clusterId) {
         shaObj.setHMACKey(secret, "TEXT");
         shaObj.update(clusterId);
         salted = shaObj.getHMAC("HEX");