azure-activedirectory-identitymodel-extensions-for-dotnet icon indicating copy to clipboard operation
azure-activedirectory-identitymodel-extensions-for-dotnet copied to clipboard

Serialize and deserialize actor token in claims identity

Open saurabhsathe-ms opened this issue 7 months ago • 56 comments

Serialize and deserialize actor token in claims identity

  • [*] You've read the Contributor Guide and Code of Conduct.
  • [*] You've included unit or integration tests for your change, where applicable.
  • [*] You've included inline docs for your change, where applicable.
  • [*] If any gains or losses in performance are possible, you've included benchmarks for your changes. More info
  • [*] There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Actor Token Serialization History

The JsonWebTokenHandler never actually supported actor token serialization—it wasn't removed at a specific point, but rather was never implemented when this newer handler was introduced. The older JwtSecurityTokenHandler has always correctly serialized the ClaimsIdentity. Actor property into the actort claim in JWTs. However, when JsonWebTokenHandler was created as a more performant alternative, the actor serialization logic was not ported over. The handler only processed individual claims from Subject.Claims and never handled the Subject.Actor property separately. This gap was reported in Issue #1840 ("[Bug] ClaimsIdentity Actor not serialized into JWTs"), and your PR #3219 addresses this by adding the missing functionality to bring JsonWebTokenHandler to feature parity with JwtSecurityTokenHandler. File changes:

Act vs Actort

actort vs act Claims

Aspect act (RFC 8693) actort (Microsoft IdentityModel)
Standard RFC 8693 OAuth 2.0 Token Exchange Microsoft-specific / Legacy
Value Type JSON object with actor claims Serialized JWT string
Structure { "act": { "sub": "...", "iss": "..." } } "actort": "eyJhbG..." (JWT)
Nesting Supports nested act for delegation chains Recursive JWT parsing required

Example of act (RFC 8693):

{
  "sub": "[email protected]",
  "act": {
    "sub": "[email protected]"
  }
}

Note: actort predates RFC 8693 and is used in this library for backward compatibility. It maps to ClaimTypes.Actor when processing claims. For RFC 8693 compliance, the standard act claim is recommended.

Requirements

Serialization Requirements:

  1. The actor token can be in form of actort, act or may_act. We need to give the users the flexibility to be able to serialize it the way they want. Actort is serialized into unsigned JWT while act and may_act are serialized as JSON objects.
  2. Actor token can be supplied as ClaimsIdentity.Actor or in claims dictionary. If supplied in both then the actor token value in claims dictionary should be used.
  3. For nested actor tokens, we should limit the amount of nesting. The max depth that we allow should be 5. Customer should be able to set the value in range [1,5]
  4. User can specify their type of actor using the security token descriptor. By default identity model will look for "act" as per the https://www.rfc-editor.org/rfc/rfc8693.html

Deserialization Requirements

  1. Actort should be deserialized as unsigned JWT. Act and may_act should be deserialized as JSON objects.
  2. Customer should be able to set the deserialization depth (amount of nested deserializations) in range [1,5]
  3. We should have a default logic that deserializes the actor claim but customers should be able to deserialize the actor claim the way they want and we should provide a delegate for enabling customers for it.
  4. User can specify their type of actor using token validation parameters. By default identity model will look for "act" as per the https://www.rfc-editor.org/rfc/rfc8693.html

Approach:

  1. I added 2 parameters in SecurityTokenDescriptor and TokenValidationParameters class to enable users to specify the max depth of actor token serialization/deserialization and their actor type. These are MaxActorChainLength and ActorClaimType. ActorChainDepth is used by IdentityModel for recursive processing of the actor token
  2. TokenValidation parameters have an additional parameter now which is ActClaimRetrieverDelegate. This enables user to provide their own logic while converting the actor claim into ClaimsIdentityActor

Here’s a summary of all the changes made in this PR across the listed files:

Based on my review of the current diff in PR #3219, here is an updated summary of all the changes:


Summary of Changes in PR #3219

1. src/Microsoft.IdentityModel.JsonWebTokens/JsonWebTokenHandler.CreateToken.cs

  • Actor Token Serialization Support:
    • Added isActorFound flag to track if actor claim exists in the Claims dictionary
    • Added logic to skip the actor claim during regular claims processing when it matches tokenDescriptor.ActorClaimType
    • Added new method WriteActorToken() that serializes actor tokens as JSON objects in the JWT payload
    • Added ValidateActorChainDepth() method to enforce maximum actor nesting depth
    • Added CreateActorTokenDescriptor() method that creates a SecurityTokenDescriptor for actor tokens from either Claims dictionary or Subject. Actor property
    • Claims dictionary actor takes precedence over Subject. Actor when both are present

2. src/Microsoft. IdentityModel. JsonWebTokens/JsonWebTokenHandler.ValidateToken.cs

  • Actor Claim Deserialization Support:
    • Added using System.Text.Json import
    • Modified CreateClaimsIdentityWithMapping() and CreateClaimsIdentityPrivate() to handle both actorClaimType (configurable) and legacy "actort" claims
    • Added new private method CreateClaimsIdentityActor() that:
      • Handles standard act claims as JSON objects using TryGetPayloadValue<JsonElement>
      • Supports custom delegate (ActClaimRetrieverDelegate) for custom actor claim processing
      • Falls back to legacy JWT string parsing for actort claims using CanReadToken()/ReadToken()
    • Added new public static method CreateActorClaimsIdentityFromJsonElement() that:
      • Creates a CaseSensitiveClaimsIdentity from a JsonElement
      • Handles nested actor claims recursively
      • Enforces MaxActorChainLength limit
      • Processes array and complex claim types

3. src/Microsoft. IdentityModel.JsonWebTokens/LogMessages.cs

  • New Log Messages:
    • IDX14313: Maximum actor token depth reached during serialization/deserialization
    • IDX14314: Exception while using custom delegate to deserialize act claim
    • IDX14315: Actor claim is not a ClaimsIdentity (wrong type provided)

4. src/Microsoft.IdentityModel.JsonWebTokens/Microsoft.IdentityModel.JsonWebTokens.csproj

  • No functional change: Only a BOM (byte order mark) added at the file start

5. src/Microsoft.IdentityModel.JsonWebTokens/PublicAPI. Unshipped.txt

  • Added public API entry for CreateActorClaimsIdentityFromJsonElement static method

6. src/Microsoft.IdentityModel. Tokens/Delegates.cs

  • New Delegate:
    • Added ActClaimRetrieverDelegate - allows custom validation/conversion of the act claim JSON element to a ClaimsIdentity

7. src/Microsoft.IdentityModel.Tokens/InternalAPI. Unshipped.txt

  • Added internal API entries for:
    • EnableActClaimSupportSwitch constant
    • EnableActClaimSupport property
    • IDX11027 log message constant

8. src/Microsoft.IdentityModel.Tokens/LogMessages.cs

  • New Log Message:
    • IDX11027: Invalid JsonWebToken handler configuration parameter value

9. src/Microsoft.IdentityModel.Tokens/PublicAPI.Unshipped.txt

  • Public API Additions:
    • TokenValidationParameters.ActorChainDepth (get/set)
    • TokenValidationParameters.ActorClaimType (get/set)
    • TokenValidationParameters. MaxActorChainLength (get/set)
    • TokenValidationParameters. ActClaimRetrieverDelegate (get/set)
    • SecurityTokenDescriptor.ActorChainDepth (get/set)
    • SecurityTokenDescriptor.ActorClaimType (get/set)
    • SecurityTokenDescriptor.MaxActorChainLength (get/set)
    • ActClaimRetrieverDelegate delegate type

10. src/Microsoft.IdentityModel.Tokens/SecurityTokenDescriptor.cs

  • New Properties:
    • MaxActorChainLength: Maximum depth for nested actor tokens (default: 4, range: 0-4)
    • ActorClaimType: The claim type name for actor claims (default: "act", cannot be "actort" or empty)
    • ActorChainDepth: Internal tracking of current recursion depth during serialization
  • Added validation with ArgumentOutOfRangeException for invalid values

11. src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs

  • New Properties:
    • MaxActorChainLength: Maximum depth for nested actor tokens (default: 4, range: 0-4)
    • ActorClaimType: The claim type name for actor claims (default: "act", cannot be "actort" or empty)
    • ActorChainDepth: Internal tracking of current recursion depth during deserialization
    • ActClaimRetrieverDelegate: Custom delegate for converting actor claim JSON to ClaimsIdentity
  • Updated Clone() method to copy all new actor-related properties

12. test/Microsoft.IdentityModel.JsonWebTokens. Tests/ActorClaimsTests.cs (New Files)

  • ActClaimDeserializationTests: Comprehensive tests for actor claim deserialization including:

    • Basic JSON element to ClaimsIdentity conversion
    • Nested actor handling
    • Multi-level nesting with depth limits
    • Array and complex type handling
    • Custom delegate support
    • Exception handling for max depth exceeded
    • End-to-end ValidateTokenAsync tests with actors
    • Legacy actort JWT string handling
  • ActClaimSerializationTests: Comprehensive tests for actor claim serialization including:

    • Actor in Claims dictionary serialization
    • Actor in Subject.Actor serialization
    • Claims dictionary takes precedence over Subject. Actor
    • Nested actor serialization
    • MaxActorChainLength validation and enforcement
    • Exception handling for exceeding max depth

13. test/Microsoft.IdentityModel.TestUtils/ValidationDelegates.cs

  • Added static ActClaimRetrieverDelegate implementation for testing purposes (returns null)

14. test/Microsoft.IdentityModel. Tokens.Tests/TokenValidationParametersTests.cs

  • Increased ExpectedPropertyCount from 62 to 66
  • Added test entries for new properties: ActorClaimType, ActorChainDepth, MaxActorChainLength
  • Updated CreateTokenValidationParameters() to set ActClaimRetrieverDelegate

Key Notes

No AppContext Switch Changes: The current diff does not include any changes to AppContextSwitches. cs. The EnableActClaimSupportSwitch referenced in the API files appears to be documented but the actual implementation in AppContextSwitches.cs is not part of this diff.

Summary: This PR adds comprehensive support for serializing and deserializing actor claims (act) in JWT tokens using JsonWebTokenHandler, with configurable nesting depth limits, custom delegate support for deserialization, and backward compatibility with legacy actort claims. Fixes #1840

saurabhsathe-ms avatar May 06 '25 16:05 saurabhsathe-ms

Summary

Summary
Generated on: 5/6/2025 - 4:45:08 PM
Coverage date: 5/6/2025 - 4:35:01 PM - 5/6/2025 - 4:44:42 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 06 '25 16:05 github-actions[bot]

Summary

Summary
Generated on: 5/6/2025 - 4:53:03 PM
Coverage date: 5/6/2025 - 4:42:26 PM - 5/6/2025 - 4:52:37 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 06 '25 16:05 github-actions[bot]

Summary

Summary
Generated on: 5/6/2025 - 4:56:18 PM
Coverage date: 5/6/2025 - 4:45:49 PM - 5/6/2025 - 4:55:52 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 06 '25 16:05 github-actions[bot]

Summary

Summary
Generated on: 5/6/2025 - 6:42:30 PM
Coverage date: 5/6/2025 - 6:32:21 PM - 5/6/2025 - 6:42:05 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 06 '25 18:05 github-actions[bot]

Summary

Summary
Generated on: 5/6/2025 - 8:25:28 PM
Coverage date: 5/6/2025 - 8:15:01 PM - 5/6/2025 - 8:25:03 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 06 '25 20:05 github-actions[bot]

Summary

Summary
Generated on: 5/7/2025 - 5:37:47 AM
Coverage date: 5/7/2025 - 5:27:07 AM - 5/7/2025 - 5:37:22 AM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 07 '25 05:05 github-actions[bot]

Summary

Summary
Generated on: 5/7/2025 - 5:15:49 PM
Coverage date: 5/7/2025 - 5:05:19 PM - 5/7/2025 - 5:15:21 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 07 '25 17:05 github-actions[bot]

Summary

Summary
Generated on: 5/7/2025 - 10:41:46 PM
Coverage date: 5/7/2025 - 10:31:40 PM - 5/7/2025 - 10:41:17 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 07 '25 22:05 github-actions[bot]

Summary

Summary
Generated on: 5/7/2025 - 10:43:46 PM
Coverage date: 5/7/2025 - 10:32:59 PM - 5/7/2025 - 10:43:20 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 07 '25 22:05 github-actions[bot]

Summary

Summary
Generated on: 5/8/2025 - 12:09:11 AM
Coverage date: 5/7/2025 - 11:58:30 PM - 5/8/2025 - 12:08:44 AM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 08 '25 00:05 github-actions[bot]

Summary

Summary
Generated on: 5/8/2025 - 1:15:34 AM
Coverage date: 5/8/2025 - 1:05:25 AM - 5/8/2025 - 1:15:10 AM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 08 '25 01:05 github-actions[bot]

Summary

Summary
Generated on: 5/8/2025 - 6:37:31 AM
Coverage date: 5/8/2025 - 6:26:34 AM - 5/8/2025 - 6:37:06 AM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 08 '25 06:05 github-actions[bot]

Summary

Summary
Generated on: 5/8/2025 - 7:23:18 AM
Coverage date: 5/8/2025 - 7:12:26 AM - 5/8/2025 - 7:22:53 AM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 08 '25 07:05 github-actions[bot]

Nice to see that happening 👍🏻

Something worth noting (but I'm sure it was already mentioned): unlike the legacy/implementation-specific actort claim, the standard act claim defined by the RFC8693 specification is NOT represented as a stringified JWT token but as a JSON object: https://datatracker.ietf.org/doc/html/rfc8693#name-act-actor-claim. Would be nice if you could support that 👍🏻

kevinchalet avatar May 08 '25 20:05 kevinchalet

Summary

Summary
Generated on: 5/12/2025 - 5:43:25 PM
Coverage date: 5/12/2025 - 5:32:45 PM - 5/12/2025 - 5:42:57 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 12 '25 17:05 github-actions[bot]

Summary

Summary
Generated on: 5/13/2025 - 6:45:14 AM
Coverage date: 5/13/2025 - 6:34:56 AM - 5/13/2025 - 6:44:49 AM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 13 '25 06:05 github-actions[bot]

Summary

Summary
Generated on: 5/13/2025 - 6:09:57 PM
Coverage date: 5/13/2025 - 5:58:52 PM - 5/13/2025 - 6:09:31 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 13 '25 18:05 github-actions[bot]

Summary

Summary
Generated on: 5/15/2025 - 6:44:17 PM
Coverage date: 5/15/2025 - 6:33:35 PM - 5/15/2025 - 6:43:48 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 15 '25 18:05 github-actions[bot]

Summary

Summary
Generated on: 5/17/2025 - 12:43:19 AM
Coverage date: 5/17/2025 - 12:32:17 AM - 5/17/2025 - 12:42:47 AM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 17 '25 00:05 github-actions[bot]

Summary

Summary
Generated on: 5/19/2025 - 9:32:19 PM
Coverage date: 5/19/2025 - 9:21:50 PM - 5/19/2025 - 9:31:45 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 19 '25 21:05 github-actions[bot]

Summary

Summary
Generated on: 5/19/2025 - 9:44:24 PM
Coverage date: 5/19/2025 - 9:33:49 PM - 5/19/2025 - 9:43:55 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 19 '25 21:05 github-actions[bot]

Summary

Summary
Generated on: 5/19/2025 - 10:00:06 PM
Coverage date: 5/19/2025 - 9:49:00 PM - 5/19/2025 - 9:59:30 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 19 '25 22:05 github-actions[bot]

It still seems the actor is serialized as a JWT instead (of a JSON object as required by the specification) in the latest commits. Is it planned to adopt the standard representation or will this thing be non-standard-only? 🫨

kevinchalet avatar May 20 '25 01:05 kevinchalet

Summary

Summary
Generated on: 5/20/2025 - 7:26:00 PM
Coverage date: 5/20/2025 - 7:15:18 PM - 5/20/2025 - 7:25:19 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 20 '25 19:05 github-actions[bot]

It still seems the actor is serialized as a JWT instead (of a JSON object as required by the specification) in the latest commits. Is it planned to adopt the standard representation or will this thing be non-standard-only? 🫨

Hello @kevinchalet , thank you so much for your reply. Can you help me understand this a little more. Are you referring to the https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/a5851123e5cdcee48f976a0eb20ea9fc851af5cd/src/Microsoft.IdentityModel.JsonWebTokens/JsonWebToken.cs#L1019. This represented Actort in our existing implementation. In our understanding Actort is different from Act. One an encoded string while other a JSON object

In our most recent implementation, we tried providing the user with an option to use act along with actort. Act is serialized as JsonObject and users can retrieve it using JsonWebToken.TryGetPayloadValue and actort can be accessed using JsonWebToken.Actor.

We are also providing users with an ability to extract claims identity out of the serialized Act using a custom delegate that they customers can create to get a ClaimsIdentity and do custom validations

So, can you please provide us with more details on what your expectations are?

saurabhsathe-ms avatar May 20 '25 21:05 saurabhsathe-ms

So, can you please provide us with more details on what your expectations are?

Sure: I'd expect ClaimsIdentity.Actor to be automatically serialized as a JSON object and used to populate the standard act claim: the non-standard actort claim is a legacy thing and there's IMHO no reason to support it with ClaimsIdentity.Actor.

I'd also expect ClaimsIdentity.Actor to be automatically populated when validating a JSON Web Token containing an act claim representing a JSON object. Having a delegate for that would likely be useful, but there should be default logic handling the standard act representation without needing custom code.

Hope it was clear 😃

kevinchalet avatar May 21 '25 04:05 kevinchalet

but there should be default logic handling the standard act representation without needing custom code

According to [RFC8693](https://www.rfc-editor.org/rfc/rfc8693.html#section-4.1-2:~:text=non%2Didentity%20claims%20(e.g.%2C%20exp%2C%20nbf%2C%20and%20aud%20are%20not%20meaningful%20when%20used%20within%20an%20act%20claim%20and%20are%20therefore%20not%20used.), non-identity claims (e.g., exp, nbf, aud) are not meaningful within an act claim and should be excluded. As a result, standard validations done by IdentityModel such as lifetime, audience, and signature checks are not relevant for the act claim.

Would it be reasonable if it performs minimal validation—extracting claims and embedding them in ClaimsIdentity.Actor recursively for the main and nested actors?

If custom validation is needed, a service can set a delegate like: ClaimsIdentity ActorClaimTypeRetriever( JsonWebToken subjectToken, string actorClaimType, TokenValidationParameters subjectValidationParameters)

sruke avatar May 21 '25 16:05 sruke

Would it be reasonable if it performs minimal validation—extracting claims and embedding them in ClaimsIdentity.Actor recursively for the main and nested actors?

Sure, that's perfectly reasonable 👍🏻

kevinchalet avatar May 21 '25 16:05 kevinchalet

Summary

Summary
Generated on: 5/21/2025 - 6:25:34 PM
Coverage date: 5/21/2025 - 6:14:23 PM - 5/21/2025 - 6:24:57 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 21 '25 18:05 github-actions[bot]

Summary

Summary
Generated on: 5/22/2025 - 2:11:57 AM
Coverage date: 5/22/2025 - 2:01:22 AM - 5/22/2025 - 2:11:24 AM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

github-actions[bot] avatar May 22 '25 02:05 github-actions[bot]