Skip to content

Commit

Permalink
split requestparameter into configuration and webviewrequest parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
unpluggedk committed May 4, 2018
1 parent 69e15a1 commit 5a5c632
Show file tree
Hide file tree
Showing 35 changed files with 329 additions and 237 deletions.
36 changes: 26 additions & 10 deletions IdentityCore/IdentityCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
9641B5291FCF3F3A00AFA0EC /* MSIDKeyedArchiverSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9641B5271FCF3F3A00AFA0EC /* MSIDKeyedArchiverSerializer.h */; };
9641B52A1FCF3F3A00AFA0EC /* MSIDKeyedArchiverSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9641B5281FCF3F3A00AFA0EC /* MSIDKeyedArchiverSerializer.m */; };
9641B52B1FCF3F3A00AFA0EC /* MSIDKeyedArchiverSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9641B5281FCF3F3A00AFA0EC /* MSIDKeyedArchiverSerializer.m */; };
964E8F6F209D03210008C5CE /* MSIDWebviewRequestParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 964E8F6D209D03210008C5CE /* MSIDWebviewRequestParameter.m */; };
964E8F70209D03210008C5CE /* MSIDWebviewRequestParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 964E8F6D209D03210008C5CE /* MSIDWebviewRequestParameter.m */; };
96996AB62097D56B0085E528 /* MSIDPkce.m in Sources */ = {isa = PBXBuildFile; fileRef = 96B8D57920946D2600E3F4A6 /* MSIDPkce.m */; };
96996AB72097D56B0085E528 /* MSIDPkce.m in Sources */ = {isa = PBXBuildFile; fileRef = 96B8D57920946D2600E3F4A6 /* MSIDPkce.m */; };
96996ABA2097D6D50085E528 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96996AB92097D6D50085E528 /* WebKit.framework */; };
Expand Down Expand Up @@ -276,9 +278,9 @@
B29CB6B61FEC6F4700F880ED /* MSIDSharedTokenCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B29CB6B41FEC6F4700F880ED /* MSIDSharedTokenCache.h */; };
B29CB6B71FEC6F4700F880ED /* MSIDSharedTokenCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B29CB6B51FEC6F4700F880ED /* MSIDSharedTokenCache.m */; };
B29CB6B81FEC6F4700F880ED /* MSIDSharedTokenCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B29CB6B51FEC6F4700F880ED /* MSIDSharedTokenCache.m */; };
B29CB6BB1FEC7CE900F880ED /* MSIDRequestParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = B29CB6B91FEC7CE900F880ED /* MSIDRequestParameters.h */; };
B29CB6BC1FEC7CE900F880ED /* MSIDRequestParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = B29CB6BA1FEC7CE900F880ED /* MSIDRequestParameters.m */; };
B29CB6BD1FEC7CE900F880ED /* MSIDRequestParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = B29CB6BA1FEC7CE900F880ED /* MSIDRequestParameters.m */; };
B29CB6BB1FEC7CE900F880ED /* MSIDConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = B29CB6B91FEC7CE900F880ED /* MSIDConfiguration.h */; };
B29CB6BC1FEC7CE900F880ED /* MSIDConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = B29CB6BA1FEC7CE900F880ED /* MSIDConfiguration.m */; };
B29CB6BD1FEC7CE900F880ED /* MSIDConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = B29CB6BA1FEC7CE900F880ED /* MSIDConfiguration.m */; };
B2B1D56D20425DA600DD81F0 /* MSIDTokenItemSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = B2B1D56C20425DA600DD81F0 /* MSIDTokenItemSerializer.h */; };
B2B1D56F20425DBF00DD81F0 /* MSIDAccountItemSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = B2B1D56E20425DBF00DD81F0 /* MSIDAccountItemSerializer.h */; };
B2B1D57220425DFD00DD81F0 /* MSIDAccountCacheItem.h in Headers */ = {isa = PBXBuildFile; fileRef = B2B1D57020425DFD00DD81F0 /* MSIDAccountCacheItem.h */; };
Expand Down Expand Up @@ -501,6 +503,8 @@
9641B5271FCF3F3A00AFA0EC /* MSIDKeyedArchiverSerializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDKeyedArchiverSerializer.h; sourceTree = "<group>"; };
9641B5281FCF3F3A00AFA0EC /* MSIDKeyedArchiverSerializer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDKeyedArchiverSerializer.m; sourceTree = "<group>"; };
96474C0C1FD688EA00DC3CE9 /* MSIDJsonSerializer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDJsonSerializer.m; sourceTree = "<group>"; };
964E8F6C209D03210008C5CE /* MSIDWebviewRequestParameter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDWebviewRequestParameter.h; sourceTree = "<group>"; };
964E8F6D209D03210008C5CE /* MSIDWebviewRequestParameter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDWebviewRequestParameter.m; sourceTree = "<group>"; };
965981041FF4C9B400E31CDE /* MSIDDefaultTokenCacheIntegrationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDDefaultTokenCacheIntegrationTests.m; sourceTree = "<group>"; };
96996AB92097D6D50085E528 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
96996ABB2097D6E20085E528 /* SafariServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SafariServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/SafariServices.framework; sourceTree = DEVELOPER_DIR; };
Expand Down Expand Up @@ -656,8 +660,8 @@
B2964BE420521D790000BC95 /* MSIDTokenFilteringHelperTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDTokenFilteringHelperTests.m; sourceTree = "<group>"; };
B29CB6B41FEC6F4700F880ED /* MSIDSharedTokenCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDSharedTokenCache.h; sourceTree = "<group>"; };
B29CB6B51FEC6F4700F880ED /* MSIDSharedTokenCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDSharedTokenCache.m; sourceTree = "<group>"; };
B29CB6B91FEC7CE900F880ED /* MSIDRequestParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDRequestParameters.h; sourceTree = "<group>"; };
B29CB6BA1FEC7CE900F880ED /* MSIDRequestParameters.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDRequestParameters.m; sourceTree = "<group>"; };
B29CB6B91FEC7CE900F880ED /* MSIDConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDConfiguration.h; sourceTree = "<group>"; };
B29CB6BA1FEC7CE900F880ED /* MSIDConfiguration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDConfiguration.m; sourceTree = "<group>"; };
B29CB6D01FEC993D00F880ED /* MSIDLegacyTokenCacheAccessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDLegacyTokenCacheAccessor.h; sourceTree = "<group>"; };
B2B1D56C20425DA600DD81F0 /* MSIDTokenItemSerializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDTokenItemSerializer.h; sourceTree = "<group>"; };
B2B1D56E20425DBF00DD81F0 /* MSIDAccountItemSerializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDAccountItemSerializer.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -883,6 +887,7 @@
96235F8F207D7128007EAB36 /* webview */ = {
isa = PBXGroup;
children = (
964E8F6B209D02030008C5CE /* request */,
96B8D57820946D1900E3F4A6 /* pkce */,
96F94A2420816B2F0034676C /* systemWebview */,
96F94A22208169380034676C /* embeddedWebview */,
Expand Down Expand Up @@ -965,6 +970,15 @@
path = serializers;
sourceTree = "<group>";
};
964E8F6B209D02030008C5CE /* request */ = {
isa = PBXGroup;
children = (
964E8F6C209D03210008C5CE /* MSIDWebviewRequestParameter.h */,
964E8F6D209D03210008C5CE /* MSIDWebviewRequestParameter.m */,
);
path = request;
sourceTree = "<group>";
};
96B8D57820946D1900E3F4A6 /* pkce */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1034,8 +1048,8 @@
B210F4541FDDFA7B005A8F76 /* MSIDBrokerResponse.m */,
B2CDB57A1FE33E99003A4B5C /* MSIDIdTokenWrapper.h */,
B2CDB57B1FE33E9A003A4B5C /* MSIDIdTokenWrapper.m */,
B29CB6B91FEC7CE900F880ED /* MSIDRequestParameters.h */,
B29CB6BA1FEC7CE900F880ED /* MSIDRequestParameters.m */,
B29CB6B91FEC7CE900F880ED /* MSIDConfiguration.h */,
B29CB6BA1FEC7CE900F880ED /* MSIDConfiguration.m */,
B2B1D575204369CA00DD81F0 /* account */,
B251CC232041050E005E0179 /* token */,
B23ECEE71FF2F3F30015FC1D /* aad_base */,
Expand Down Expand Up @@ -1437,7 +1451,7 @@
B251CC1B2040F6B5005E0179 /* MSIDLegacyTokenCacheKey.h in Headers */,
B2D81BC01FF5C7520093859A /* MSIDTestBrokerResponse.h in Headers */,
B251CC47204105A7005E0179 /* MSIDRefreshableToken.h in Headers */,
B29CB6BB1FEC7CE900F880ED /* MSIDRequestParameters.h in Headers */,
B29CB6BB1FEC7CE900F880ED /* MSIDConfiguration.h in Headers */,
9641B5291FCF3F3A00AFA0EC /* MSIDKeyedArchiverSerializer.h in Headers */,
B2908C071FCA29EB00AFE98E /* MSIDTelemetryBaseEvent.h in Headers */,
D62600181FBD380500EE4487 /* NSString+MSIDExtensions.h in Headers */,
Expand Down Expand Up @@ -1867,6 +1881,7 @@
B214C3A01FE854FE0070C4F2 /* MSIDLegacyTokenCacheAccessor.m in Sources */,
B2CDB57D1FE33EC5003A4B5C /* MSIDIdTokenWrapper.m in Sources */,
B251CC222040F6C6005E0179 /* MSIDDefaultTokenCacheKey.m in Sources */,
964E8F70209D03210008C5CE /* MSIDWebviewRequestParameter.m in Sources */,
B2B1D57A204369D600DD81F0 /* MSIDAccountType.m in Sources */,
B210F4571FDDFA7B005A8F76 /* MSIDBrokerResponse.m in Sources */,
B26A0B892071B752006BD95A /* MSIDAADV2Oauth2Factory.m in Sources */,
Expand All @@ -1875,7 +1890,7 @@
B20657AC1FC91FB100412B7D /* MSIDTelemetryPiiOiiRules.m in Sources */,
B210F42A1FDDE19B005A8F76 /* MSIDJsonObject.m in Sources */,
96B8D57C20946D2600E3F4A6 /* MSIDPkce.m in Sources */,
B29CB6BD1FEC7CE900F880ED /* MSIDRequestParameters.m in Sources */,
B29CB6BD1FEC7CE900F880ED /* MSIDConfiguration.m in Sources */,
B251CC52204105AE005E0179 /* MSIDTokenType.m in Sources */,
D61AFAB61FD8B6C600DABBE5 /* MSIDContants.m in Sources */,
B2CDB5741FE2F4DF003A4B5C /* NSOrderedSet+MSIDExtensions.m in Sources */,
Expand Down Expand Up @@ -2017,6 +2032,7 @@
04D32CB21FD62141000B123E /* MSIDError.m in Sources */,
B20657B01FC91FD100412B7D /* MSIDTelemetryEventStrings.m in Sources */,
D6D9A4511FBD3FB800EFA430 /* NSURL+MSIDExtensions.m in Sources */,
964E8F6F209D03210008C5CE /* MSIDWebviewRequestParameter.m in Sources */,
B26A0B882071B752006BD95A /* MSIDAADV2Oauth2Factory.m in Sources */,
B227F28D2056264F00F7B822 /* MSIDMacTokenCache.m in Sources */,
B251CC56204109A4005E0179 /* MSIDTokenCacheItem.m in Sources */,
Expand Down Expand Up @@ -2045,7 +2061,7 @@
D62600161FBD380500EE4487 /* NSDictionary+MSIDExtensions.m in Sources */,
B2B1D579204369D600DD81F0 /* MSIDAccountType.m in Sources */,
B251CC212040F6C6005E0179 /* MSIDDefaultTokenCacheKey.m in Sources */,
B29CB6BC1FEC7CE900F880ED /* MSIDRequestParameters.m in Sources */,
B29CB6BC1FEC7CE900F880ED /* MSIDConfiguration.m in Sources */,
B20657C91FC926B200412B7D /* MSIDTelemetryHttpEvent.m in Sources */,
B20657C41FC9262800412B7D /* NSString+MSIDTelemetryExtensions.m in Sources */,
B210F4291FDDE19B005A8F76 /* MSIDJsonObject.m in Sources */,
Expand Down
6 changes: 3 additions & 3 deletions IdentityCore/src/cache/MSIDSharedCacheAccessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#import "MSIDTokenType.h"

@class MSIDAccount;
@class MSIDRequestParameters;
@class MSIDConfiguration;
@class MSIDBaseToken;
@class MSIDTokenResponse;
@class MSIDRefreshToken;
Expand All @@ -35,7 +35,7 @@
@protocol MSIDSharedCacheAccessor <NSObject>

- (BOOL)saveTokensWithFactory:(MSIDOauth2Factory *)factory
requestParams:(MSIDRequestParameters *)requestParams
requestParams:(MSIDConfiguration *)requestParams
account:(MSIDAccount *)account
response:(MSIDTokenResponse *)response
context:(id<MSIDRequestContext>)context
Expand All @@ -53,7 +53,7 @@

- (MSIDBaseToken *)getTokenWithType:(MSIDTokenType)tokenType
account:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error;

Expand Down
12 changes: 6 additions & 6 deletions IdentityCore/src/cache/accessor/MSIDDefaultTokenCacheAccessor.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#import "MSIDDefaultTokenCacheKey.h"
#import "MSIDAccountCacheItem.h"
#import "MSIDAADV2IdTokenWrapper.h"
#import "MSIDRequestParameters.h"
#import "MSIDConfiguration.h"
#import "NSDate+MSIDExtensions.h"
#import "MSIDTokenFilteringHelper.h"
#import "MSIDOauth2Factory.h"
Expand Down Expand Up @@ -98,7 +98,7 @@ - (void)fillInternalErrorWithMessage:(NSString *)message
#pragma mark - MSIDSharedCacheAccessor

- (BOOL)saveTokensWithFactory:(MSIDOauth2Factory *)factory
requestParams:(MSIDRequestParameters *)requestParams
requestParams:(MSIDConfiguration *)requestParams
account:(MSIDAccount *)account
response:(MSIDTokenResponse *)response
context:(id<MSIDRequestContext>)context
Expand Down Expand Up @@ -232,7 +232,7 @@ - (BOOL)saveAccessToken:(MSIDAccessToken *)accessToken

- (MSIDBaseToken *)getTokenWithType:(MSIDTokenType)tokenType
account:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error
{
Expand Down Expand Up @@ -542,7 +542,7 @@ - (BOOL)saveToken:(MSIDBaseToken *)token
#pragma mark - Account

- (BOOL)saveAccount:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error
{
Expand Down Expand Up @@ -582,7 +582,7 @@ - (BOOL)saveAccount:(MSIDAccount *)account


- (MSIDAccessToken *)getATForAccount:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error
{
Expand Down Expand Up @@ -665,7 +665,7 @@ - (MSIDAccessToken *)getATForAccount:(MSIDAccount *)account
}

- (MSIDRefreshToken *)getRTForAccount:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ - (BOOL)checkUserIdentifier:(MSIDAccount *)account
#pragma mark - MSIDSharedCacheAccessor

- (BOOL)saveTokensWithFactory:(MSIDOauth2Factory *)factory
requestParams:(MSIDRequestParameters *)requestParams
requestParams:(MSIDConfiguration *)requestParams
account:(MSIDAccount *)account
response:(MSIDTokenResponse *)response
context:(id<MSIDRequestContext>)context
Expand Down Expand Up @@ -214,7 +214,7 @@ - (BOOL)saveToken:(MSIDBaseToken *)token

- (MSIDBaseToken *)getTokenWithType:(MSIDTokenType)tokenType
account:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error
{
Expand Down Expand Up @@ -392,7 +392,7 @@ - (BOOL)clearWithContext:(id<MSIDRequestContext>)context error:(NSError **)error
#pragma mark - Private

- (MSIDBaseToken *)getRefreshTokenWithAccount:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error
{
Expand Down
12 changes: 6 additions & 6 deletions IdentityCore/src/cache/accessor/MSIDSharedTokenCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// Save operations
- (BOOL)saveTokensWithFactory:(MSIDOauth2Factory *)factory
requestParams:(MSIDRequestParameters *)requestParams
requestParams:(MSIDConfiguration *)requestParams
response:(MSIDTokenResponse *)response
context:(id<MSIDRequestContext>)context
error:(NSError **)error;
Expand All @@ -53,16 +53,16 @@
error:(NSError **)error;

- (MSIDAccessToken *)getATForAccount:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error;

- (MSIDLegacySingleResourceToken *)getLegacyTokenForAccount:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error;

- (MSIDLegacySingleResourceToken *)getLegacyTokenWithRequestParams:(MSIDRequestParameters *)parameters
- (MSIDLegacySingleResourceToken *)getLegacyTokenWithRequestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error;

Expand All @@ -71,7 +71,7 @@
potentially be used for many resources for that given user, client ID and authority.
*/
- (MSIDRefreshToken *)getRTForAccount:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
context:(id<MSIDRequestContext>)context
error:(NSError **)error;

Expand All @@ -80,7 +80,7 @@
be used for many resources within a given family of client IDs.
*/
- (MSIDRefreshToken *)getFRTforAccount:(MSIDAccount *)account
requestParams:(MSIDRequestParameters *)parameters
requestParams:(MSIDConfiguration *)parameters
familyId:(NSString *)familyId
context:(id<MSIDRequestContext>)context
error:(NSError **)error;
Expand Down
Loading

0 comments on commit 5a5c632

Please sign in to comment.