Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msal-node serializes/deserializes userAssertionHash #5398

Merged
merged 4 commits into from
Nov 24, 2022
Merged

Conversation

derisen
Copy link
Contributor

@derisen derisen commented Nov 16, 2022

In response to #5397

p.s. will update the obo sample separately for manual testing. will also check if MSIDLabs support OBO flow for E2E testing.

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2022

Codecov Report

Merging #5398 (0de4a86) into dev (42e1baf) will not change coverage.
The diff coverage is 100.00%.

Flag Coverage Δ *Carryforward flag
msal-angular 96.50% <ø> (ø) Carriedforward from ebec0ed
msal-browser 86.47% <100.00%> (ø) Carriedforward from ebec0ed
msal-common 85.45% <ø> (ø) Carriedforward from ebec0ed
msal-core 82.84% <ø> (ø) Carriedforward from ebec0ed
msal-node 83.37% <ø> (ø)
msal-node-extensions 76.03% <ø> (ø) Carriedforward from ebec0ed
msal-react 94.50% <100.00%> (ø) Carriedforward from ebec0ed
node-token-validation 88.88% <ø> (ø) Carriedforward from ebec0ed

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
lib/msal-node/src/cache/serializer/Deserializer.ts 89.09% <ø> (ø)
lib/msal-node/src/cache/serializer/Serializer.ts 100.00% <ø> (ø)
lib/msal-browser/src/index.ts 100.00% <100.00%> (ø)
lib/msal-react/src/hooks/useMsalAuthentication.ts 92.04% <100.00%> (ø)

@@ -84,7 +84,8 @@ export class Serializer {
key_id: atEntity.keyId,
token_type: atEntity.tokenType,
requestedClaims: atEntity.requestedClaims,
requestedClaimsHash: atEntity.requestedClaimsHash
requestedClaimsHash: atEntity.requestedClaimsHash,
userAssertionHash: atEntity.userAssertionHash
Copy link
Contributor Author

@derisen derisen Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure to follow camel or snake casing here (not sure why we switched). This method could possibly use a refactoring to not require manual mapping from AccessTokenEntity to SerializedAccessTokenEntity

@bgavrilMS
Copy link
Member

LGTM

@derisen derisen merged commit 8ee7fc6 into dev Nov 24, 2022
@derisen derisen deleted the fix-obo-caching branch November 24, 2022 01:46
@ghost
Copy link

ghost commented Dec 7, 2022

🎉@azure/msal-node@v1.14.5 has been released which incorporates this pull request.:tada:

Handy links:

@derisen derisen mentioned this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal-node Related to msal-node package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MSAL Node does not serialize/desiralize userAssertionHash in OBO
4 participants