Skip to content

Make it explicit in the naming that the connections are 'SmartCard' #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jdmoreira
Copy link
Member

To better align with the other SDKs and so it becomes more explicit going forward, we've decided to rename the connections (and helpers) to include SmartCard in their names.

@jdmoreira jdmoreira requested a review from Copilot July 30, 2025 12:02
Copy link

@Copilot 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

This PR systematically renames connection types to explicitly include "SmartCard" in their names, improving clarity and alignment with other SDKs. The changes ensure that all connection types now clearly indicate they are SmartCard-based connections.

Key changes:

  • Renames core connection types (NFCConnectionNFCSmartCardConnection, LightningConnectionLightningSmartCardConnection, SmartCardConnectionUSBSmartCardConnection)
  • Updates helper classes (WiredConnectionWiredSmartCardConnection, AnyConnectionAnySmartCardConnection)
  • Renames the base protocol from Connection to SmartCardConnection

Reviewed Changes

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

Show a summary per file
File Description
YubiKit.md Updates documentation examples and references to use new SmartCard naming
USBSmartCardConnectionExtension.md Updates documentation titles and references for USB connection
OATHSampleCode.md Updates sample code to use new connection type names
NFCSmartCardConnectionExtension.md Updates documentation titles and references for NFC connection
LightningSmartCardConnectionExtension.md Updates documentation titles and references for Lightning connection
GettingStarted.md Updates documentation note about connection types
ConnectionExtension.md Updates base protocol documentation from Connection to SmartCardConnection
SmartCardConnections.swift Renames helper classes and updates their implementation
SmartCardConnection+Extensions.swift Updates extension to work with renamed SmartCardConnection protocol
Logger+Extensions.swift Updates logger category name for SmartCard connections
USBSmartCardConnection.swift Renames SmartCardConnection struct to USBSmartCardConnection
Session.swift Updates Session protocol to use SmartCardConnection instead of Connection
SecurityDomainSession.swift Updates to use SmartCardConnection protocol
SCPProcessor.swift Updates method signatures to use SmartCardConnection
PIVSession.swift Updates to use SmartCardConnection protocol
OATHSession.swift Updates to use SmartCardConnection protocol
NFCSmartCardConnection.swift Renames NFCConnection to NFCSmartCardConnection
ManagementSession.swift Updates to use SmartCardConnection protocol
LightningSmartCardConnection.swift Renames LightningConnection to LightningSmartCardConnection
Connection.swift Renames Connection protocol to SmartCardConnection
SettingsModel.swift Updates sample code to use new connection type names
OATHListModel.swift Updates sample code to use new connection type names
README.md Updates example code to use new connection naming
XCTestCase+SCP.swift Updates test helper to use SmartCardConnection
SCP11FullStackTests.swift Updates test method signature
ManagementFullStackTests.swift Updates test helper method signature
ConnectionFullStackTests.swift Updates type alias and method calls
AllowedConnections.swift Updates test helper methods to use new connection types
Comments suppressed due to low confidence (1)

YubiKit/YubiKit/Utilities/SmartCardConnections.swift:62

  • The enum case name 'usb' is inconsistent with the new naming pattern. It should be renamed to 'usbSmartCard' to align with the SmartCard naming convention used throughout this PR.
        case usb

Copy link

@DennisDyallo DennisDyallo left a comment

Choose a reason for hiding this comment

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

Ocular review, looks good to me.

@jdmoreira jdmoreira self-assigned this Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants