Skip to content

Comments

Add new identity Holder snippets#802

Merged
cy245 merged 5 commits intomainfrom
identity-update-holder-snippets
Feb 20, 2026
Merged

Add new identity Holder snippets#802
cy245 merged 5 commits intomainfrom
identity-update-holder-snippets

Conversation

@cy245
Copy link
Contributor

@cy245 cy245 commented Feb 18, 2026

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @cy245, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates foundational support for digital credential management within the identity module. It updates the build configuration to include necessary dependencies and provides a comprehensive set of code snippets for developers to implement features related to OpenID4VP, SD-JWT, and mDOC credentials, enabling the creation, registration, and handling of digital credentials.

Highlights

  • New Digital Credential Dependencies: Added new version references and library definitions for registryDigitalCredentials components in gradle/libs.versions.toml to support digital credential functionalities.
  • Gradle Build Configuration Update: Included new implementation dependencies in identity/credentialmanager/build.gradle.kts for the digital credential registry, provider, and Play Services provider.
  • Digital Credential Holder Snippets: Introduced a new Kotlin file, DigitalCredentialHolder.kt, containing various code snippets and helper classes for managing digital credentials, including registry creation, mapping SD-JWT and mDOC entries, credential registration, handling requests, and verifying identity.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • gradle/libs.versions.toml
    • Added a new version reference for registryDigitalCredentials.
    • Defined new library entries for androidx-registry-digitalcredentials, androidx-registry-provider, and androidx-registry-provider-play-services.
  • identity/credentialmanager/build.gradle.kts
    • Added implementation dependencies for libs.androidx.registry.digitalcredentials, libs.androidx.registry.provider, and libs.androidx.registry.provider.play.services.
  • identity/credentialmanager/src/main/java/com/example/identity/credentialmanager/DigitalCredentialHolder.kt
    • Added a new Kotlin file DigitalCredentialHolder.kt.
    • Implemented DigitalCredentialHolderActivity with functions for creating and registering credential registries, mapping stored SD-JWT and mDOC entries, handling selected digital credential requests, checking verifier identity, and returning credential responses.
    • Defined sealed classes StoredSdJwtEntry, StoredMdocEntry, and HolderCredentialResponse to represent data structures for digital credentials.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces new dependencies for digital credentials and a new Kotlin file, DigitalCredentialHolder.kt, which provides snippets for handling digital credentials. While the dependency additions are straightforward, the new Kotlin file contains several placeholder implementations, hardcoded values, and potential runtime issues that need to be addressed before this code can be considered production-ready. Specifically, there are broad exception catches, undefined variables, and logic that could lead to crashes or incorrect behavior.

@cy245 cy245 marked this pull request as ready for review February 18, 2026 17:44
@snippet-bot
Copy link

snippet-bot bot commented Feb 18, 2026

Here is the summary of changes.

You are about to add 10 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Copy link
Contributor

@vinishavathwani vinishavathwani left a comment

Choose a reason for hiding this comment

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

Did a perfunctory review, LGTM.

@cy245
Copy link
Contributor Author

cy245 commented Feb 19, 2026

@yrezgui or @kkuan2011 as owners if you could please approve the we can move ahead with the DAC page

implementation(libs.androidx.credentials.play.services.auth)
// [END android_identity_gradle_dependencies]

// In your app module's build.gradle:
Copy link
Contributor

Choose a reason for hiding this comment

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

is this comment needed if it's not shown in an snippet? (it should be build.gradle.kts instead right?)

Copy link
Contributor

@kkuan2011 kkuan2011 left a comment

Choose a reason for hiding this comment

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

I think there's a merge conflict on the version catalog file, other LGTM

@cy245 cy245 merged commit 7bbe9bb into main Feb 20, 2026
6 checks passed
@cy245 cy245 deleted the identity-update-holder-snippets branch February 20, 2026 19:38
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