Closed mdmathias closed 1 year ago
The direction here feels good.
Relatedly, here's a straw man (re)naming proposal for discussion:
GTMAppAuthFetcherAuthorization
-> GTMAuthState <GTMFetcherAuthorizationProtocol, NSSecureCoding>
GTMAuthStateStore
GTMKeychainStore <GTMAuthStateStore>
GTMOAuth2KeychainCompatibility
-> GTMOAuth2CompatibilityStore <GTMAuthStateStore>
// Creates a GTMAuthState from an OIDAuthState.
GTMAuthState *authState = [[GTMAuthState alloc] initWithAuthState:appAuthState];
self.authState = authState;
// Creates a GTMSessionFetcherService with the GTMAuthState as authorizer.
GTMSessionFetcherService *fetcherService = [[GTMSessionFetcherService alloc] init];
fetcherService.authorizer = self.authState;
I like the name changes. PR updated.
The @objc
name for AuthState
is currently GTMAppAuthFetcherAuthorization
in this change. We should use a different name for ObjC and make sure that the KeychainStore
does the right migration.
This change also removes saving, reading, and removing operations from the API for
GTMAppAuthFetcherAuthorization
andGTMOAuth2KeychainCompatibility
.