* Refactor OidcTokenProvider to remove dependency on IdentityModel and improve token handling
* Improve OidcTokenProvider error handling and expiry setting
The constructor `OidcTokenProvider` now always sets the `_expiry`
field by calling `GetExpiryFromToken()`, regardless of whether
`_idToken` is null or empty, removing the previous check for a
non-empty `_idToken`.
The `GetExpiryFromToken` method has been updated to handle invalid
JWT token formats more gracefully. Instead of throwing an
`ArgumentException` when the token format is invalid or when the
'exp' claim is missing, the method now returns a default value.
The logic for parsing the JWT token and extracting the 'exp' claim
has been wrapped in a try-catch block. If any exception occurs
during this process, it is caught, and the method returns a default
value instead of throwing an exception.
* Refactor parts initialization inside try block
Moved the initialization of the `parts` variable, which splits the `_idToken` string, inside the `try` block. Removed the previous check for exactly three elements in the `parts` array and the default return value if the check failed.
* Add tests.
---------
Co-authored-by: Boshi Lian <farmer1992@gmail.com>
* generate based on v1.32
* bump ver
* Delete swagger.json.unprocessed
* Update target frameworks and SDK versions in project files
* Remove extra API endpoint from swagger.json
* Update .NET SDK version to 9.0.x and adjust package references
* happy build
* Enhance certificate handling for .NET 9.0 compatibility in CertUtils and KubernetesClientConfiguration
* Add mapping for V1beta1ResourceClaim to V1ResourceClaim in AutoMapper configurations
* Refactor certificate loading to improve compatibility with .NET 9.0
* Update package versions in Directory.Packages.props for improved compatibility and features
* Update Fractions package version to 7.3.0 for improved compatibility