Update AppAuth to 1.7.6 and keep our existing changes#1
Merged
zackcmartin merged 87 commits intomasterfrom Feb 24, 2025
Merged
Conversation
Make ExternalUserAgent subspec depend on Core. Use deployment_target instead of platform.
Created the EntepriseUserAgent subspec, and AppAuthEnterpriseUserAgent framework target to house this and future external user agents aimed at enterprises.
Add badges to README
- Code is from tree https://github.com/google/GTMAppAuth/tree/10d138eb05ad299fd6260741e7b92b0090db0963 - I contributed this code originally to GTMAppAuth on Dec 6, 2016 google/GTMAppAuth@2eb382f
- Add beginnings of 'AppAuthTV' Pod subspec - Remove dependency on `GTMAppAuthFetcherAuthorization` - Remove GTMAPPAUTH_USER_IMPORTS code - Verified with `pod lib lint`
* Rename OID to GTM, remove extra header * Remove TVConfigurationForGoogle, update copyright headers * Return OIDAuthState instead of GTMAppAuthFetcherAuthorization * Add AppAuthTV to Xcode targets, fix NSObject description method bug * Add files to AppAuthTV target * Remove property synthesize * Add AppAuthTVTests target, pointing to UnitTests/UnitTestsInfo.plist and included in AppAuthTV scheme. Reorder imports * Update min tvOS version and identifier for AppAuthTV target * Correct capitalization in AppAuthTV identifier * Update reference URLs, references to Google removed * Remove non-functioning AppAuthTVTests target (tests coming in future PR) * Fix indent spacing in OIDTVServiceConfiguration
* OIDTVAuthorizationRequest tests * Add tests to AppAuthTVScheme * add AppAuthTV to .travis.yml
Adds OIDTVTokenRequest class, which is a subclass of OIDTokenRequest, to better adhere to the [RFC for TV authentication](https://tools.ietf.org/html/rfc8628#section-3.4). This adds the required `device_code` property which is sent in the request body, which differs from the `code` property for the authorization code in the parent class. Additionally, the grant type for TV authorization is hard-coded in, and several unused fields are dropped from the initializer and body request code.
Update the example project to support discovery
…aximumSize: instead of #pragma
- Create a tvOS example README - Document tvOS support in main README - Link to tvOS example from the example README - Add Google IdP tvOS details
AppleTV test file was included in a source target which did not have XCTest dependencies and was causing builds to fail.
* Add GitHub Actions CI workflow. * Skip conformance tests until we migrate to new backend.
zackcmartin
commented
Feb 21, 2025
Author
zackcmartin
left a comment
There was a problem hiding this comment.
There were only these 2 conflicts
| @interface OIDExternalUserAgentIOS : NSObject<OIDExternalUserAgent> | ||
|
|
||
| - (nonnull instancetype)init API_AVAILABLE(ios(11)) | ||
| - (null_unspecified instancetype)init API_AVAILABLE(ios(11)) |
Author
There was a problem hiding this comment.
@kydonnelly you updated this from nullable to nonnull but it has since been updated to null_unspecified
0ea3ac2
There was a problem hiding this comment.
this is probably fine, nonnull may have been a shortcut/hack back before I knew how to better swiftify things
Comment on lines
+58
to
59
| - (null_unspecified instancetype)init { | ||
| #pragma clang diagnostic push |
kydonnelly
reviewed
Feb 24, 2025
Comment on lines
-194
to
+219
| NSDictionary *dictionary = [[NSDictionary alloc] initWithCoder:aDecoder]; | ||
| NSDictionary *dictionary; | ||
| if ([aDecoder containsValueForKey:kDiscoveryDictionaryKey]) { | ||
| // We're decoding a collection type (NSDictionary) from NSJSONSerialization's | ||
| // +JSONObjectWithData, so we need to include all classes that could potentially be contained | ||
| // within. | ||
| NSSet<Class> *allowedClasses = [NSSet setWithArray:@[[NSDictionary class], | ||
| [NSArray class], | ||
| [NSString class], | ||
| [NSNumber class], | ||
| [NSNull class]]]; | ||
| dictionary = [aDecoder decodeObjectOfClasses:allowedClasses | ||
| forKey:kDiscoveryDictionaryKey]; | ||
| } else { | ||
| // Decode using the old encoding which delegated to NSDictionary's encodeWithCoder: | ||
| // implementation: | ||
| // | ||
| // - (void)encodeWithCoder:(NSCoder *)aCoder { | ||
| // [_discoveryDictionary encodeWithCoder:aCoder]; | ||
| // } | ||
| dictionary = [[NSDictionary alloc] initWithCoder:aDecoder]; | ||
| } |
There was a problem hiding this comment.
reminder to self: put a breakpoint here during Dev QA
kydonnelly
reviewed
Feb 24, 2025
Comment on lines
-188
to
+198
| OIDServiceDiscovery *discoveryDocument = [aDecoder decodeObjectOfClass:[OIDServiceDiscovery class] | ||
| forKey:kDiscoveryDocumentKey]; | ||
| NSSet<Class> *allowedClasses = [NSSet setWithArray:@[[OIDServiceDiscovery class], | ||
| // The following classes are required in | ||
| // order to support secure decoding of the | ||
| // old OIDServiceDiscovery encoding. | ||
| [NSDictionary class], | ||
| [NSArray class], | ||
| [NSString class], | ||
| [NSNumber class], | ||
| [NSNull class]]]; | ||
| OIDServiceDiscovery *discoveryDocument = [aDecoder decodeObjectOfClasses:allowedClasses | ||
| forKey:kDiscoveryDocumentKey]; |
There was a problem hiding this comment.
if there are any unusual bug reports from users, this internal change might be something to double-check
kydonnelly
approved these changes
Feb 24, 2025
kydonnelly
left a comment
There was a problem hiding this comment.
Thanks for handling this! I'll do Dev QA on the PR that updates this inside Notability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We want to maintain this and this change while updating to the most recent version
I merged in the most up to date version of the AppAuth repo