@azure/msal-node
Advanced tools
Comparing version 2.3.0 to 2.4.0
export declare const name = "@azure/msal-node"; | ||
export declare const version = "2.3.0"; | ||
export declare const version = "2.4.0"; | ||
//# sourceMappingURL=packageMetadata.d.ts.map |
{ | ||
"$schema": "https://json.schemastore.org/package.json", | ||
"name": "@azure/msal-node", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"author": { | ||
@@ -80,3 +80,3 @@ "name": "Microsoft", | ||
"dependencies": { | ||
"@azure/msal-common": "14.2.0", | ||
"@azure/msal-common": "14.3.0", | ||
"jsonwebtoken": "^9.0.0", | ||
@@ -83,0 +83,0 @@ "uuid": "^8.3.0" |
@@ -22,2 +22,3 @@ /* | ||
StaticAuthorityOptions, | ||
CacheHelpers, | ||
} from "@azure/msal-common"; | ||
@@ -82,18 +83,16 @@ | ||
for (const key in cache) { | ||
if (cache[key as string] instanceof AccountEntity) { | ||
inMemoryCache.accounts[key] = cache[key] as AccountEntity; | ||
} else if (cache[key] instanceof IdTokenEntity) { | ||
inMemoryCache.idTokens[key] = cache[key] as IdTokenEntity; | ||
} else if (cache[key] instanceof AccessTokenEntity) { | ||
inMemoryCache.accessTokens[key] = cache[ | ||
key | ||
] as AccessTokenEntity; | ||
} else if (cache[key] instanceof RefreshTokenEntity) { | ||
inMemoryCache.refreshTokens[key] = cache[ | ||
key | ||
] as RefreshTokenEntity; | ||
} else if (cache[key] instanceof AppMetadataEntity) { | ||
inMemoryCache.appMetadata[key] = cache[ | ||
key | ||
] as AppMetadataEntity; | ||
const value = cache[key]; | ||
if (typeof value !== "object") { | ||
continue; | ||
} | ||
if (value instanceof AccountEntity) { | ||
inMemoryCache.accounts[key] = value as AccountEntity; | ||
} else if (CacheHelpers.isIdTokenEntity(value)) { | ||
inMemoryCache.idTokens[key] = value as IdTokenEntity; | ||
} else if (CacheHelpers.isAccessTokenEntity(value)) { | ||
inMemoryCache.accessTokens[key] = value as AccessTokenEntity; | ||
} else if (CacheHelpers.isRefreshTokenEntity(value)) { | ||
inMemoryCache.refreshTokens[key] = value as RefreshTokenEntity; | ||
} else if (value instanceof AppMetadataEntity) { | ||
inMemoryCache.appMetadata[key] = value as AppMetadataEntity; | ||
} else { | ||
@@ -246,3 +245,3 @@ continue; | ||
const idToken = this.getItem(idTokenKey) as IdTokenEntity; | ||
if (IdTokenEntity.isIdTokenEntity(idToken)) { | ||
if (CacheHelpers.isIdTokenEntity(idToken)) { | ||
return idToken; | ||
@@ -258,3 +257,3 @@ } | ||
setIdTokenCredential(idToken: IdTokenEntity): void { | ||
const idTokenKey = idToken.generateCredentialKey(); | ||
const idTokenKey = CacheHelpers.generateCredentialKey(idToken); | ||
this.setItem(idTokenKey, idToken); | ||
@@ -269,3 +268,3 @@ } | ||
const accessToken = this.getItem(accessTokenKey) as AccessTokenEntity; | ||
if (AccessTokenEntity.isAccessTokenEntity(accessToken)) { | ||
if (CacheHelpers.isAccessTokenEntity(accessToken)) { | ||
return accessToken; | ||
@@ -281,3 +280,3 @@ } | ||
setAccessTokenCredential(accessToken: AccessTokenEntity): void { | ||
const accessTokenKey = accessToken.generateCredentialKey(); | ||
const accessTokenKey = CacheHelpers.generateCredentialKey(accessToken); | ||
this.setItem(accessTokenKey, accessToken); | ||
@@ -296,3 +295,3 @@ } | ||
) as RefreshTokenEntity; | ||
if (RefreshTokenEntity.isRefreshTokenEntity(refreshToken)) { | ||
if (CacheHelpers.isRefreshTokenEntity(refreshToken)) { | ||
return refreshToken as RefreshTokenEntity; | ||
@@ -308,3 +307,4 @@ } | ||
setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void { | ||
const refreshTokenKey = refreshToken.generateCredentialKey(); | ||
const refreshTokenKey = | ||
CacheHelpers.generateCredentialKey(refreshToken); | ||
this.setItem(refreshTokenKey, refreshToken); | ||
@@ -527,3 +527,3 @@ } | ||
): string { | ||
const updatedCacheKey = credential.generateCredentialKey(); | ||
const updatedCacheKey = CacheHelpers.generateCredentialKey(credential); | ||
@@ -530,0 +530,0 @@ if (currentCacheKey !== updatedCacheKey) { |
@@ -18,2 +18,4 @@ /* | ||
CacheManager, | ||
CredentialType, | ||
AuthenticationScheme, | ||
} from "@azure/msal-common"; | ||
@@ -86,6 +88,7 @@ import { | ||
const serializedIdT = idTokens[key]; | ||
const mappedIdT = { | ||
const idToken: IdTokenEntity = { | ||
homeAccountId: serializedIdT.home_account_id, | ||
environment: serializedIdT.environment, | ||
credentialType: serializedIdT.credential_type, | ||
credentialType: | ||
serializedIdT.credential_type as CredentialType, | ||
clientId: serializedIdT.client_id, | ||
@@ -95,4 +98,2 @@ secret: serializedIdT.secret, | ||
}; | ||
const idToken: IdTokenEntity = new IdTokenEntity(); | ||
CacheManager.toObject(idToken, mappedIdT); | ||
idObjects[key] = idToken; | ||
@@ -115,6 +116,7 @@ }); | ||
const serializedAT = accessTokens[key]; | ||
const mappedAT = { | ||
const accessToken: AccessTokenEntity = { | ||
homeAccountId: serializedAT.home_account_id, | ||
environment: serializedAT.environment, | ||
credentialType: serializedAT.credential_type, | ||
credentialType: | ||
serializedAT.credential_type as CredentialType, | ||
clientId: serializedAT.client_id, | ||
@@ -129,3 +131,3 @@ secret: serializedAT.secret, | ||
keyId: serializedAT.key_id, | ||
tokenType: serializedAT.token_type, | ||
tokenType: serializedAT.token_type as AuthenticationScheme, | ||
requestedClaims: serializedAT.requestedClaims, | ||
@@ -135,4 +137,2 @@ requestedClaimsHash: serializedAT.requestedClaimsHash, | ||
}; | ||
const accessToken: AccessTokenEntity = new AccessTokenEntity(); | ||
CacheManager.toObject(accessToken, mappedAT); | ||
atObjects[key] = accessToken; | ||
@@ -156,6 +156,7 @@ }); | ||
const serializedRT = refreshTokens[key]; | ||
const mappedRT = { | ||
const refreshToken: RefreshTokenEntity = { | ||
homeAccountId: serializedRT.home_account_id, | ||
environment: serializedRT.environment, | ||
credentialType: serializedRT.credential_type, | ||
credentialType: | ||
serializedRT.credential_type as CredentialType, | ||
clientId: serializedRT.client_id, | ||
@@ -167,5 +168,2 @@ secret: serializedRT.secret, | ||
}; | ||
const refreshToken: RefreshTokenEntity = | ||
new RefreshTokenEntity(); | ||
CacheManager.toObject(refreshToken, mappedRT); | ||
rtObjects[key] = refreshToken; | ||
@@ -172,0 +170,0 @@ }); |
/* eslint-disable header/header */ | ||
export const name = "@azure/msal-node"; | ||
export const version = "2.3.0"; | ||
export const version = "2.4.0"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
703049
14551
+ Added@azure/msal-common@14.3.0(transitive)
- Removed@azure/msal-common@14.2.0(transitive)
Updated@azure/msal-common@14.3.0