Skip to content

Refactor test class - OID4VCJWTIssuerEndpointTest#48644

Open
keshavprashantdeshpande wants to merge 1 commit intokeycloak:mainfrom
keshavprashantdeshpande:issue-48416-refactor-OID4VCJWTIssuerEndpointTest
Open

Refactor test class - OID4VCJWTIssuerEndpointTest#48644
keshavprashantdeshpande wants to merge 1 commit intokeycloak:mainfrom
keshavprashantdeshpande:issue-48416-refactor-OID4VCJWTIssuerEndpointTest

Conversation

@keshavprashantdeshpande
Copy link
Copy Markdown
Contributor

@keshavprashantdeshpande keshavprashantdeshpande commented Apr 30, 2026

See #48416

I would like to propose the refactor in batches.
This batch has following changes:

  • testGetCredentialOfferUriUnsupportedCredential
  • testGetCredentialOfferUriUnauthorized -> IMO as per the RFC 6750 we should return 401 instead of 400
  • testGetCredentialOfferUriInvalidToken -> IMO as per the RFC 6750 we should return 401 instead of 400
  • testGetCredentialOfferUnauthorized -> renamed to testGetCredentialOfferWithUnknownNonce
  • testGetCredentialOfferWithABrokenNote -> removed as there is no way to test it without runOnServer

Following tests and its helper methods are removed as they are covered in OID4VCKeyAttestationTest.java:

  • testRequestCredentialWithKidProofWithoutKeyAttestation
  • testRequestCredentialWithJwkKeyAttestationAccepted
  • testRequestCredentialWithKidKeyAttestationAccepted
  • testRequestCredentialWithAttestationProofAccepted
  • testRequestCredentialWithKeyAttestationMismatchedProofKeyRejected
  • testRequestCredentialWithKeyAttestationMissingExpRejected

With these changes 29/52 tests are refactored and with the next PR I will refactor the other

Copy link
Copy Markdown
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

@keshavprashantdeshpande Thanks! Added comment inline. But overal direction looks good, Thanks

@mposolda mposolda self-assigned this May 5, 2026
@keshavprashantdeshpande keshavprashantdeshpande force-pushed the issue-48416-refactor-OID4VCJWTIssuerEndpointTest branch from 02740ea to 5e7228e Compare May 8, 2026 15:57
See keycloak#48416

Signed-off-by: Keshav Deshpande <keshavprashantdeshpande@gmail.com>
@keshavprashantdeshpande keshavprashantdeshpande force-pushed the issue-48416-refactor-OID4VCJWTIssuerEndpointTest branch from 5e7228e to 50f5254 Compare May 8, 2026 17:38
@keshavprashantdeshpande
Copy link
Copy Markdown
Contributor Author

@mposolda Can you please review again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants