@@ -214,7 +214,7 @@ export class SPAClient extends BaseClient {
214
214
const requestScopes = new ScopeSet ( request . scopes || [ ] ) ;
215
215
216
216
// Get current cached tokens
217
- const cachedAccount = this . cacheStorage . getAccount ( CacheHelper . generateAccountCacheKey ( request . account ) ) ;
217
+ const cachedAccount = this . cacheManager . getAccount ( CacheHelper . generateAccountCacheKey ( request . account ) ) ;
218
218
219
219
const homeAccountId = cachedAccount . homeAccountId ;
220
220
const env = cachedAccount . environment ;
@@ -286,7 +286,7 @@ export class SPAClient extends BaseClient {
286
286
*/
287
287
async logout ( account : IAccount , acquireTokenAuthority : Authority ) : Promise < string > {
288
288
// Clear current account.
289
- this . cacheStorage . removeAccount ( CacheHelper . generateAccountCacheKey ( account ) ) ;
289
+ this . cacheManager . removeAccount ( CacheHelper . generateAccountCacheKey ( account ) ) ;
290
290
// Get postLogoutRedirectUri.
291
291
let postLogoutRedirectUri = "" ;
292
292
try {
@@ -329,7 +329,7 @@ export class SPAClient extends BaseClient {
329
329
*/
330
330
public handleFragmentResponse ( hashFragment : string , cachedState : string ) : string {
331
331
// Handle responses.
332
- const responseHandler = new ResponseHandler ( this . config . authOptions . clientId , this . cacheStorage , this . cryptoUtils , this . logger ) ;
332
+ const responseHandler = new ResponseHandler ( this . config . authOptions . clientId , this . cacheManager , this . cryptoUtils , this . logger ) ;
333
333
// Deserialize hash fragment response parameters.
334
334
const hashUrlString = new UrlString ( hashFragment ) ;
335
335
const serverParams = hashUrlString . getDeserializedHash < ServerAuthorizationCodeResponse > ( ) ;
@@ -355,7 +355,7 @@ export class SPAClient extends BaseClient {
355
355
this . config . authOptions . clientId ,
356
356
inputRealm
357
357
) ;
358
- return this . cacheStorage . getCredential ( idTokenKey ) as IdTokenEntity ;
358
+ return this . cacheManager . getCredential ( idTokenKey ) as IdTokenEntity ;
359
359
}
360
360
361
361
/**
@@ -372,7 +372,7 @@ export class SPAClient extends BaseClient {
372
372
realm : inputRealm ,
373
373
target : scopes . printScopes ( )
374
374
} ;
375
- const credentialCache : CredentialCache = this . cacheStorage . getCredentialsFilteredBy ( accessTokenFilter ) ;
375
+ const credentialCache : CredentialCache = this . cacheManager . getCredentialsFilteredBy ( accessTokenFilter ) ;
376
376
const accessTokens = Object . values ( credentialCache . accessTokens ) ;
377
377
if ( accessTokens . length > 1 ) {
378
378
// TODO: Figure out what to throw or return here.
@@ -393,7 +393,7 @@ export class SPAClient extends BaseClient {
393
393
CredentialType . REFRESH_TOKEN ,
394
394
this . config . authOptions . clientId
395
395
) ;
396
- return this . cacheStorage . getCredential ( refreshTokenKey ) as RefreshTokenEntity ;
396
+ return this . cacheManager . getCredential ( refreshTokenKey ) as RefreshTokenEntity ;
397
397
}
398
398
399
399
/**
@@ -428,7 +428,7 @@ export class SPAClient extends BaseClient {
428
428
} ) ;
429
429
430
430
// Create response handler
431
- const responseHandler = new ResponseHandler ( this . config . authOptions . clientId , this . cacheStorage , this . cryptoUtils , this . logger ) ;
431
+ const responseHandler = new ResponseHandler ( this . config . authOptions . clientId , this . cacheManager , this . cryptoUtils , this . logger ) ;
432
432
// Validate response. This function throws a server error if an error is returned by the server.
433
433
responseHandler . validateTokenResponse ( acquiredTokenResponse . body ) ;
434
434
// Return token response with given parameters
@@ -517,7 +517,7 @@ export class SPAClient extends BaseClient {
517
517
* @returns {@link Account } - the account object stored in MSAL
518
518
*/
519
519
getAccount ( homeAccountIdentifier : string , env ?: string , rlm ?: string ) : AccountEntity {
520
- const accountCache = this . cacheStorage . getAccountsFilteredBy ( {
520
+ const accountCache = this . cacheManager . getAccountsFilteredBy ( {
521
521
homeAccountId : homeAccountIdentifier ,
522
522
environment : env ,
523
523
realm : rlm
0 commit comments