1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

refactor utils service to utils

This commit is contained in:
Kyle Spearrin
2018-04-23 13:03:47 -04:00
parent 5e7115f78d
commit 0fa9fc58eb
16 changed files with 168 additions and 250 deletions

View File

@@ -1,9 +1,10 @@
import { ConstantsService } from './constants.service';
import { UtilsService } from './utils.service';
import { StorageService } from '../abstractions/storage.service';
import { TokenService as TokenServiceAbstraction } from '../abstractions/token.service';
import { Utils } from '../misc/utils';
const Keys = {
accessToken: 'accessToken',
refreshToken: 'refreshToken',
@@ -94,7 +95,7 @@ export class TokenService implements TokenServiceAbstraction {
throw new Error('JWT must have 3 parts');
}
const decoded = UtilsService.urlBase64Decode(parts[1]);
const decoded = Utils.urlBase64Decode(parts[1]);
if (decoded == null) {
throw new Error('Cannot decode the token');
}