Skip to content

Add SHARE_CODE resource type support for session creation and retrieval#390

Draft
Copilot wants to merge 3 commits intofeature/SDK-2752-DotNet-add-support-for-requesting-and-retrieving-share-code-resources--tasksfrom
copilot/sub-pr-389
Draft

Add SHARE_CODE resource type support for session creation and retrieval#390
Copilot wants to merge 3 commits intofeature/SDK-2752-DotNet-add-support-for-requesting-and-retrieving-share-code-resources--tasksfrom
copilot/sub-pr-389

Conversation

Copy link

Copilot AI commented Dec 10, 2025

Implements support for the new SHARE_CODE resource type, enabling clients to request share codes during session creation and retrieve share code data during session retrieval.

Changes

Session Creation

  • RequiredShareCode - class with issuer and scheme fields (no SDK-level validation)
  • RequiredShareCodeBuilder - fluent builder for RequiredShareCode construction
  • SessionSpecification - added required_share_codes array field with JSON serialization

Session Retrieval

  • ShareCodeResourceResponse - handles share code resources with id, source, created_at, last_updated, and media objects (lookup_profile, returned_profile, id_photo, file)
  • VerifyShareCodeTaskResponse - handles VERIFY_SHARE_CODE_TASK task type
  • ResourceContainer - added share_codes array parsing and accessor
  • ResourceResponse - extended task factory to handle VERIFY_SHARE_CODE_TASK

Example Usage

// Session creation
$sessionSpec = (new SessionSpecificationBuilder())
    ->withRequiredShareCode(
        (new RequiredShareCodeBuilder())
            ->withIssuer('gov.uk.dvla')
            ->withScheme('DrivingLicence')
            ->build()
    )
    ->build();

// Session retrieval
$session = $docScanClient->getSession($sessionId);
$shareCodes = $session->getResources()->getShareCodes();
foreach ($shareCodes as $shareCode) {
    $media = $shareCode->getLookupProfileMedia();
    $tasks = $shareCode->getVerifyShareCodeTasks();
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 10, 2025 16:53
Co-authored-by: mehmet-yoti <111424390+mehmet-yoti@users.noreply.github.com>
Co-authored-by: mehmet-yoti <111424390+mehmet-yoti@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 10, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/BrainMaestro/composer-git-hooks/zipball/ffed8803690ac12214082120eee3441b00aa390e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/9f10aa6390cea91da175ea608880e942d7c0226e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/paragonie/constant_time_encoding/zipball/d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/phpstan/extension-installer/zipball/66c7adc9dfa38b6b5838a9fb728b68a7d8348051
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/zar2b5 /usr/bin/composer install --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1G1WGe /usr/bin/composer install -v nfig/composer/vendor/bin/git che/composer/vcsbash (http block)
  • https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/2b72e8e17d2034145f239126e876e5fb659675e2
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/phpstan/phpstan/zipball/48236ddf823547081b2b153d1cd2994b784328c3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/zar2b5 /usr/bin/composer install --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1G1WGe /usr/bin/composer install -v nfig/composer/vendor/bin/git che/composer/vcsbash (http block)
  • https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/57d440fc54a00fda5b8781e8d9bf0140ea6d8e52
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/reactphp/dns/zipball/7562c05391f42701c1fccf189c8225fece1cd7c3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/reactphp/socket/zipball/ef5b17b81f6f60504c539313f94f2d826c5faa08
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/zar2b5 /usr/bin/composer install --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1G1WGe /usr/bin/composer install -v nfig/composer/vendor/bin/git che/composer/vcsbash (http block)
  • https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/symfony/filesystem/zipball/d551b38811096d0be9c4691d406991b47c0c630a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/symfony/options-resolver/zipball/b38026df55197f9e39a44f3215788edf83187b80
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/zar2b5 /usr/bin/composer install --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1G1WGe /usr/bin/composer install -v nfig/composer/vendor/bin/git che/composer/vcsbash (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/zar2b5 /usr/bin/composer install --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1G1WGe /usr/bin/composer install -v nfig/composer/vendor/bin/git che/composer/vcsbash (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/zar2b5 /usr/bin/composer install --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1G1WGe /usr/bin/composer install -v nfig/composer/vendor/bin/git che/composer/vcsbash (http block)
  • https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/zar2b5 /usr/bin/composer install --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1G1WGe /usr/bin/composer install -v nfig/composer/vendor/bin/git che/composer/vcsbash (http block)
  • https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/symfony/process/zipball/7ca8dc2d0dcf4882658313aba8be5d9fd01026c8
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/symfony/stopwatch/zipball/8a24af0a2e8a872fb745047180649b8418303084
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
  • https://api.github.com/repos/symfony/string/zipball/50590a057841fa6bf69d12eceffce3465b9e32cb
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/zar2b5 /usr/bin/composer install --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1G1WGe /usr/bin/composer install -v nfig/composer/vendor/bin/git che/composer/vcsbash (http block)
  • https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/1BmD42 /usr/bin/composer install --dev --no-interaction (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add support for requesting and retrieving SHARE_CODE resources Add SHARE_CODE resource type support for session creation and retrieval Dec 10, 2025
Copilot AI requested a review from mehmet-yoti December 10, 2025 17:04
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