Added tests cases for the DPoP validation and save scenarios#945
Merged
pmathew92 merged 1 commit intodpop_thumbprint_fixfrom Mar 30, 2026
Merged
Added tests cases for the DPoP validation and save scenarios#945pmathew92 merged 1 commit intodpop_thumbprint_fixfrom
pmathew92 merged 1 commit intodpop_thumbprint_fixfrom
Conversation
There was a problem hiding this comment.
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_typepersistence andcom.auth0.dpop_key_thumbprintremoval 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.keyStoreto 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
I have read the Auth0 general contribution guidelines
I have read the Auth0 Code of Conduct
All existing and new tests complete without errors