Skip to content

Make primary authentication method (PACE/BAC) configurable - #271

Open
Premeide wants to merge 5 commits into
AndyQ:mainfrom
FCP-Identity:main
Open

Make primary authentication method (PACE/BAC) configurable#271
Premeide wants to merge 5 commits into
AndyQ:mainfrom
FCP-Identity:main

Conversation

@Premeide

@Premeide Premeide commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

Adds an authenticationMethod parameter to readPassport(...) letting callers
choose whether PACE or BAC is attempted first, with automatic fallback
to the other if the primary fails. Replaces the previous skipPACE: Bool flag.

public enum AuthenticationMethod { case BAC, PACE }
// defaults to .PACE — existing behavior unchanged

Why

Upstream hardcodes PACE-first. Some document/reader combinations are more
reliable starting with BAC; this gives integrators that control instead of an
all-or-nothing skip.

Also included

  • Select the PACEInfo whose mapping type is GM (was: first match) — makes
    PACE selection deterministic and avoids picking an unsupported mapping.
  • Run selectPassportApplication() once after auth completes (works for either
    path now that PACE/BAC are symmetric).
  • Clearer logging for Active Authentication (supplied vs generated challenge)
    and Chip Authentication support detection.

Notes

  • skipPACE is removed; the SPM example app is updated accordingly.

@Premeide
Premeide marked this pull request as ready for review June 25, 2026 13:59
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.

1 participant