Skip to content

Handle MsiTokenResponse::expires_on being an int or string. #2390

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

Merged
merged 3 commits into from
Apr 9, 2025

Conversation

tot0
Copy link
Contributor

@tot0 tot0 commented Mar 26, 2025

Some MSI token servers don't follow the spec and return expires_on as an int unix timestamp, rather than the expected string of an int unix timestamp, so to be broadly compatible it's nice to handle both.

@heaths heaths requested a review from chlowell March 26, 2025 18:18
@heaths
Copy link
Member

heaths commented Mar 26, 2025

@chlowell I will review the PR, but I leave it up to you if you want to take it for Identity. We already have code that handles this (see the AzureCliCredential) but there's no uniformity with the older code still in azure_identity currently. Because this issue might be more general, we might instead want to have a helper of sorts for this class of problem.

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure Identity SDK Improvements Mar 26, 2025
@heaths heaths added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Mar 26, 2025
@tot0 tot0 merged commit 9502776 into Azure:main Apr 9, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure Identity SDK Improvements Apr 9, 2025
chlowell added a commit that referenced this pull request Apr 9, 2025
chlowell added a commit that referenced this pull request Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity The azure_identity crate customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants