Skip to content

Commit 750daf2

Browse files
authored
Merge pull request #2594 from AzureAD/swagup/remove_MSALAccount+MultiTenantAccount.h
[MSAL2.x] Moving methods of MSALAccount+MultiTenantAccount.h to MSALAccount.h
2 parents c4be100 + a335866 commit 750daf2

14 files changed

+49
-89
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Removed deprecated methods from native auth public interface (#2588)
55
* Removed the deprecated MSALLogger interface and implementation class (#2591)
66
* Enforced a valid broker-capable redirect URI format for AAD scenarios (#2592)
7+
* Merged the MSALAccount (MultiTenantAccount) category into the MSALAccount protocol and removed the MSALAccount+MultiTenantAccount.h (#2594)
78

89
## [1.9.0]
910
* Add feature flags provider to be controlled from broker (#2540)

MSAL/MSAL.xcodeproj/project.pbxproj

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,6 @@
752752
B273D0F5226E86C1005A7BB4 /* MSALAuthority_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 23A68A8A20F5508B0071E435 /* MSALAuthority_Internal.h */; };
753753
B273D0F6226E86C2005A7BB4 /* MSALAuthority_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 23A68A8A20F5508B0071E435 /* MSALAuthority_Internal.h */; };
754754
B277241E1EAE97D700375C53 /* MSALStressTestHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = B277241D1EAE97D700375C53 /* MSALStressTestHelper.m */; };
755-
B27CCDE0229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = B27CCDDE229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h */; settings = {ATTRIBUTES = (Public, ); }; };
756-
B27CCDE1229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = B27CCDDE229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h */; settings = {ATTRIBUTES = (Public, ); }; };
757755
B27CCDF2229F9F4700CAD565 /* MSALAccountEnumerationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = B27CCDF0229F9F4700CAD565 /* MSALAccountEnumerationParameters.h */; settings = {ATTRIBUTES = (Public, ); }; };
758756
B27CCDF3229F9F4700CAD565 /* MSALAccountEnumerationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = B27CCDF0229F9F4700CAD565 /* MSALAccountEnumerationParameters.h */; settings = {ATTRIBUTES = (Public, ); }; };
759757
B27CCDF4229F9F4700CAD565 /* MSALAccountEnumerationParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = B27CCDF1229F9F4700CAD565 /* MSALAccountEnumerationParameters.m */; };
@@ -862,8 +860,6 @@
862860
B2D47899230E3DFB005AE186 /* MSALExternalAccountProviding.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A56A4228262770023F5E6 /* MSALExternalAccountProviding.h */; settings = {ATTRIBUTES = (Public, ); }; };
863861
B2D4789A230E3E00005AE186 /* MSALSerializedADALCacheProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A56B8228266B40023F5E6 /* MSALSerializedADALCacheProvider.h */; settings = {ATTRIBUTES = (Public, ); }; };
864862
B2D4789B230E3E01005AE186 /* MSALSerializedADALCacheProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A56B8228266B40023F5E6 /* MSALSerializedADALCacheProvider.h */; settings = {ATTRIBUTES = (Public, ); }; };
865-
B2D4789C230E3E14005AE186 /* MSALAccount+MultiTenantAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = B27CCDDE229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h */; settings = {ATTRIBUTES = (Public, ); }; };
866-
B2D4789D230E3E14005AE186 /* MSALAccount+MultiTenantAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = B27CCDDE229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h */; settings = {ATTRIBUTES = (Public, ); }; };
867863
B2D4789F230E3E2D005AE186 /* MSALWebviewParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 2338294D22D7DC9E001B8AD6 /* MSALWebviewParameters.h */; settings = {ATTRIBUTES = (Public, ); }; };
868864
B2D478A0230E3E40005AE186 /* MSALAccountEnumerationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = B27CCDF0229F9F4700CAD565 /* MSALAccountEnumerationParameters.h */; settings = {ATTRIBUTES = (Public, ); }; };
869865
B2D478A1230E3E40005AE186 /* MSALAccountEnumerationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = B27CCDF0229F9F4700CAD565 /* MSALAccountEnumerationParameters.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -2290,7 +2286,6 @@
22902286
B2734C1D21253B1B00DAB1CD /* MSALDotNetCacheCoexistenceTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSALDotNetCacheCoexistenceTests.m; sourceTree = "<group>"; };
22912287
B277241C1EAE97D700375C53 /* MSALStressTestHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSALStressTestHelper.h; sourceTree = "<group>"; };
22922288
B277241D1EAE97D700375C53 /* MSALStressTestHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSALStressTestHelper.m; sourceTree = "<group>"; };
2293-
B27CCDDE229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MSALAccount+MultiTenantAccount.h"; sourceTree = "<group>"; };
22942289
B27CCDF0229F9F4700CAD565 /* MSALAccountEnumerationParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSALAccountEnumerationParameters.h; sourceTree = "<group>"; };
22952290
B27CCDF1229F9F4700CAD565 /* MSALAccountEnumerationParameters.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSALAccountEnumerationParameters.m; sourceTree = "<group>"; };
22962291
B281B33A226BC225009619AB /* MSALPublicClientApplicationConfigTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSALPublicClientApplicationConfigTests.m; sourceTree = "<group>"; };
@@ -3897,7 +3892,6 @@
38973892
B21786A323A72DFC00839CE8 /* MSALPublicClientApplication+SingleAccount.h */,
38983893
D65A6F851E3FF3D900C69FBA /* MSALResult.h */,
38993894
D65A6F861E3FF3D900C69FBA /* MSALAccount.h */,
3900-
B27CCDDE229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h */,
39013895
6077D49F22498BFF001798A2 /* MSALTenantProfile.h */,
39023896
B221CED920C0AC60002F5E94 /* MSALAccountId.h */,
39033897
94E876CA1E492D6000FB96ED /* MSALAuthority.h */,
@@ -4998,7 +4992,6 @@
49984992
04A6B6072269381F0035C7C2 /* MSAL.h in Headers */,
49994993
B273D076226E84D6005A7BB4 /* MSALTelemetryConfig.h in Headers */,
50004994
B2D4788D230E3DD4005AE186 /* MSALOauth2Provider.h in Headers */,
5001-
B2D4789D230E3E14005AE186 /* MSALAccount+MultiTenantAccount.h in Headers */,
50024995
B2D47889230E3DCC005AE186 /* MSALAADOauth2Provider.h in Headers */,
50034996
B273D0AD226E8585005A7BB4 /* MSALErrorConverter+Internal.h in Headers */,
50044997
0D96DB3E27850F1200DEAF87 /* MSALWipeCacheForAllAccountsConfig.h in Headers */,
@@ -5090,7 +5083,6 @@
50905083
B273D087226E851F005A7BB4 /* MSALClaimsRequest.h in Headers */,
50915084
B273D097226E855E005A7BB4 /* MSALRedirectUri+Internal.h in Headers */,
50925085
B2D4788C230E3DD3005AE186 /* MSALOauth2Provider.h in Headers */,
5093-
B2D4789C230E3E14005AE186 /* MSALAccount+MultiTenantAccount.h in Headers */,
50945086
B2D47888230E3DCC005AE186 /* MSALAADOauth2Provider.h in Headers */,
50955087
B273D0F5226E86C1005A7BB4 /* MSALAuthority_Internal.h in Headers */,
50965088
B273D079226E84E2005A7BB4 /* MSALLoggerConfig.h in Headers */,
@@ -5259,7 +5251,6 @@
52595251
96CF951F2268FD0400D97374 /* MSALPublicClientApplication.h in Headers */,
52605252
B2E2A9422393191D00BA2EA3 /* MSIDInteractiveRequestParameters+MSALRequest.h in Headers */,
52615253
23014D192567233A005E12F2 /* MSALAuthenticationSchemeProtocolInternal.h in Headers */,
5262-
B27CCDE0229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h in Headers */,
52635254
B203459D21AFA1FB00B221AA /* MSALRedirectUri+Internal.h in Headers */,
52645255
B253151923DD607600432133 /* MSALDeviceInformation.h in Headers */,
52655256
);
@@ -5322,7 +5313,6 @@
53225313
B26756C522921C42000F01D7 /* MSALAADOauth2Provider.h in Headers */,
53235314
B2FBB3DB28F72A5700A3591C /* MSALWPJMetaData+Internal.h in Headers */,
53245315
DE8DC56F2C6622ED00534E8F /* MSALLogMask.h in Headers */,
5325-
B27CCDE1229F65D700CAD565 /* MSALAccount+MultiTenantAccount.h in Headers */,
53265316
232D614B2248484C00260C42 /* MSALClaimsRequest.h in Headers */,
53275317
B253153123DD684E00432133 /* MSALSSOExtensionRequestHandler.h in Headers */,
53285318
B26756D622921CC4000F01D7 /* MSALOauth2Provider+Internal.h in Headers */,

MSAL/src/configuration/external/MSALExternalAccountHandler.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#import "MSALAccount.h"
2828
#import "MSALAADAuthority.h"
2929
#import "MSALResult.h"
30-
#import "MSALAccount+MultiTenantAccount.h"
3130
#import "MSALOauth2Provider.h"
3231
#import "MSALAccount+Internal.h"
3332
#import "MSALErrorConverter.h"

MSAL/src/configuration/external/ios/MSALLegacySharedADALAccount.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ @interface MSALLegacySharedADALAccount()
3939
@property (nonatomic, readwrite) NSString *environment;
4040
@property (nonatomic, readwrite) NSString *identifier;
4141
@property (nonatomic, readwrite) NSDictionary *accountClaims;
42+
@property (nonatomic, readwrite) NSArray<MSALTenantProfile *> *tenantProfiles;
43+
@property (nonatomic, readwrite) MSALAccountId *homeAccountId;
44+
@property (nonatomic, readwrite) BOOL isSSOAccount;
4245

4346
@end
4447

MSAL/src/configuration/external/ios/MSALLegacySharedMSAAccount.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ @interface MSALLegacySharedMSAAccount()
3737
@property (nonatomic, readwrite) NSString *environment;
3838
@property (nonatomic, readwrite) NSString *identifier;
3939
@property (nonatomic, readwrite) NSDictionary *accountClaims;
40-
40+
@property (nonatomic, readwrite) NSArray<MSALTenantProfile *> *tenantProfiles;
41+
@property (nonatomic, readwrite) MSALAccountId *homeAccountId;
42+
@property (nonatomic, readwrite) BOOL isSSOAccount;
4143
@end
4244

4345
static NSString *kDefaultCacheAuthority = @"https://login.windows.net/common";

MSAL/src/instance/MSALAccountsProvider.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#import "MSALErrorConverter.h"
4949
#import "MSALTenantProfile.h"
5050
#import "MSIDAccountMetadataCacheAccessor.h"
51-
#import "MSALAccount+MultiTenantAccount.h"
5251
#import "MSIDSSOExtensionGetAccountsRequest.h"
5352
#import "MSIDRequestParameters+Broker.h"
5453
#import "MSALAccount+Internal.h"

MSAL/src/public/MSAL.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ FOUNDATION_EXPORT const unsigned char MSAL__Framework_VersionString[];
6767
#import <MSAL/MSALJsonSerializable.h>
6868
#import <MSAL/MSALJsonDeserializable.h>
6969
#import <MSAL/MSALTenantProfile.h>
70-
#import <MSAL/MSALAccount+MultiTenantAccount.h>
7170
#import <MSAL/MSALAccountEnumerationParameters.h>
7271
#import <MSAL/MSALExternalAccountProviding.h>
7372
#import <MSAL/MSALWebviewParameters.h>

MSAL/src/public/MSALAccount+MultiTenantAccount.h

Lines changed: 0 additions & 61 deletions
This file was deleted.

MSAL/src/public/MSALAccount.h

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
#import <Foundation/Foundation.h>
2929

3030
@class MSALPublicClientApplication;
31-
31+
@class MSALTenantProfile;
32+
@class MSALAccountId;
3233
/**
3334
Representation of an authenticated account in the Microsoft identity platform.
3435
Use MSALAccount to query information about the account, like username or id_token claims.
@@ -53,7 +54,7 @@
5354

5455
/**
5556
Host part of the authority string used for authentication based on the issuer identifier.
56-
Note that if a host supports multiple tenants, there'll be one MSALAccount for the host and one tenant profile per each tenant accessed (see MSALAccount+MultiTenantAccount.h header)
57+
Note that if a host supports multiple tenants, there'll be one MSALAccount for the host and one tenant profile per each tenant accessed
5758
If a host doesn't support multiple tenants, there'll be one MSALAccount with accountClaims returned.
5859
5960
e.g. if app accesses following tenants: Contoso.com and MyOrg.com in the Public AAD cloud, there'll be following information returned:
@@ -80,6 +81,32 @@
8081
*/
8182
@property (readonly, nullable) NSDictionary<NSString *, id> *accountClaims;
8283

84+
#pragma mark - Getting information about account in different AAD tenants
85+
86+
/**
87+
Array of all tenants for which a token has been requested by the client.
88+
89+
@note This field will only be available when querying account(s) by the following APIs of MSALPublicClientApplication:
90+
`-[MSALPublicClientApplication allAccounts:]`
91+
`-[MSALPublicClientApplication accountForUsername:error:]`
92+
93+
The field will be nil in other scenarios. E.g., account returned as part of the result of an acquire token interactive/silent call.
94+
*/
95+
@property (readonly, nullable) NSArray<MSALTenantProfile *> *tenantProfiles;
96+
97+
/**
98+
Unique identifier of the account in the home tenant.
99+
Provides additional information regarding account's home objectId and home tenantId in case of AAD.
100+
*/
101+
@property (readonly, nullable) MSALAccountId *homeAccountId;
102+
103+
/**
104+
Indicates that account is used for device wide SSO.
105+
This property is only available for organizational accounts when AAD SSO plugin is present on the device.
106+
It will be NO in all other cases.
107+
*/
108+
@property (readonly) BOOL isSSOAccount;
109+
83110
@end
84111

85112
/**

MSAL/test/unit/MSALAccountTests.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#import "MSALAccount+Internal.h"
4040
#import "MSALAuthority.h"
4141
#import "MSALAccountId+Internal.h"
42-
#import "MSALAccount+MultiTenantAccount.h"
4342

4443
@interface MSALUserTests : MSALTestCase
4544

0 commit comments

Comments
 (0)