Skip to content
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

Support individual keys in SDK #279

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Conversation

polpielladev
Copy link
Collaborator

@polpielladev polpielladev commented Jul 8, 2024

Currently, the SDK only supports team keys, but the App Store Connect API offers the possibility of creating and using individual keys with the same permissions as the user to authenticate requests.

Individual keys do not have the iss field in the JWT's payload but they instead have a sub field: https://developer.apple.com/documentation/appstoreconnectapi/generating_tokens_for_api_requests#4313913. This PR makes backwards-compatible changes to allow developers to authenticate requests with an individual API key.

@polpielladev polpielladev requested a review from AvdLee as a code owner July 8, 2024 12:18
@SwiftLeeBot
Copy link
Collaborator

SwiftLeeBot commented Jul 8, 2024

Warnings
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'Builds' is deprecated: Deprecated
⚠️ 'Builds' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'InAppPurchase' is deprecated: Deprecated
⚠️ 'GameCenterEnabledVersion' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'InAppPurchase' is deprecated: Deprecated
⚠️ 'GameCenterEnabledVersion' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'InAppPurchase' is deprecated: Deprecated
⚠️ 'GameCenterEnabledVersion' is deprecated: Deprecated
⚠️ 'Builds' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'InAppPurchase' is deprecated: Deprecated
⚠️ 'GameCenterEnabledVersion' is deprecated: Deprecated
Messages
📖 AppStoreConnect-Swift-SDK-Tests: Executed 17 tests (0 failed, 0 retried, 0 skipped) in 0.238 seconds
📖

View more details on Bitrise

Code Coverage Report

Name Coverage

SwiftLint found issues

Severity File Reason
Warning JWT.swift:95 Variable declarations should be separated from other statements by a blank line (let_var_whitespace)
Warning JWT.swift:42 Line should be 140 characters or less; currently it has 141 characters (line_length)
Warning JWT.swift:60 Line should be 140 characters or less; currently it has 141 characters (line_length)
Warning JWT.swift:105 Line should be 140 characters or less; currently it has 143 characters (line_length)
Warning JWT.swift:9 Imports should be sorted (sorted_imports)
Warning JWT.swift:130 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:95 Line should be 140 characters or less; currently it has 142 characters (line_length)
Warning APIProvider.swift:78 Use shorthand syntax for optional binding (shorthand_optional_binding)
Warning APIProvider.swift:138 Use shorthand syntax for optional binding (shorthand_optional_binding)
Warning APIProvider.swift:50 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:69 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:91 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:206 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:312 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:342 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:363 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:380 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:390 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:406 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:419 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:430 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:440 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:448 Lines should not have trailing whitespace (trailing_whitespace)
Warning APIProvider.swift:168 Parentheses are not needed when declaring closure arguments (unneeded_parentheses_in_closure_argument)

Generated by 🚫 Danger Swift against b20f100

Copy link
Owner

@AvdLee AvdLee left a comment

Choose a reason for hiding this comment

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

Ideally, we would write tests for this too to ensure nothing breaks in the future. Since you're now Indie, I guess you have time for that? ;-P I'm accepting to at least unblock you for now!

@polpielladev polpielladev enabled auto-merge July 16, 2024 13:40
@polpielladev polpielladev force-pushed the feature/support-individual-keys branch from f5a69ea to b20f100 Compare July 16, 2024 13:40
@polpielladev
Copy link
Collaborator Author

Ideally, we would write tests for this too to ensure nothing breaks in the future. Since you're now Indie, I guess you have time for that? ;-P I'm accepting to at least unblock you for now!

Good point, I will make sure I add some tests in a future PR 👍

@polpielladev polpielladev merged commit 4c1264e into master Jul 16, 2024
2 checks passed
@polpielladev polpielladev deleted the feature/support-individual-keys branch July 16, 2024 13:46
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