Skip to content

Added tests cases for the DPoP validation and save scenarios#945

Merged
pmathew92 merged 1 commit intodpop_thumbprint_fixfrom
dpop_thumbprint_unit_tests
Mar 30, 2026
Merged

Added tests cases for the DPoP validation and save scenarios#945
pmathew92 merged 1 commit intodpop_thumbprint_fixfrom
dpop_thumbprint_unit_tests

Conversation

@pmathew92
Copy link
Copy Markdown
Contributor

Changes

This PR adds UT tests for the DPoP thumbprint mismatch handling scenario

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. Since this library has unit testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage

  • This change adds integration test coverage

  • This change has been tested on the latest version of the platform/language or why not

Checklist

Copilot AI review requested due to automatic review settings March 27, 2026 11:17
@pmathew92 pmathew92 requested a review from a team as a code owner March 27, 2026 11:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds unit test coverage for DPoP thumbprint persistence and DPoP state validation (missing key, client not configured, thumbprint mismatch, and migration backfill) in the credentials managers’ storage flows.

Changes:

  • Extend existing save/clear credentials tests to assert com.auth0.token_type persistence and com.auth0.dpop_key_thumbprint removal where applicable.
  • Add new unit tests covering DPoP thumbprint save/remove scenarios and DPoP validation failure modes (missing key, not configured, mismatch, migration backfill).
  • Introduce test setup/teardown that mocks DPoPUtil.keyStore to deterministically simulate key presence/rotation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
auth0/src/test/java/com/auth0/android/authentication/storage/SecureCredentialsManagerTest.kt Adds DPoP-focused tests for encrypted credential flows, plus updates existing assertions for token type + thumbprint storage behavior.
auth0/src/test/java/com/auth0/android/authentication/storage/CredentialsManagerTest.kt Adds DPoP-focused tests for non-encrypted credential flows and updates existing assertions to reflect thumbprint removal behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@utkrishtsahu utkrishtsahu left a comment

Choose a reason for hiding this comment

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

LGTM

@pmathew92 pmathew92 merged commit f54d0d2 into dpop_thumbprint_fix Mar 30, 2026
9 checks passed
@pmathew92 pmathew92 deleted the dpop_thumbprint_unit_tests branch March 30, 2026 06:05
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.

3 participants