Skip to content

Commit 2e0cfe7

Browse files
authored
Merge pull request #765 from AzureAD/release/1.5.3
Release common lib 1.5.3 (MSAL 1.1.5 and broker 3.1.7)
2 parents 44b985c + 3f941bb commit 2e0cfe7

File tree

72 files changed

+2726
-372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2726
-372
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode11
2+
osx_image: xcode11.5
33

44
# Set up our rubygems (slather and xcpretty, namely)
55
install:

IdentityCore/IdentityCore.xcodeproj/project.pbxproj

Lines changed: 148 additions & 6 deletions
Large diffs are not rendered by default.

IdentityCore/MSIDTestsHostApp/MSIDTestsHostApp.entitlements

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<dict>
55
<key>keychain-access-groups</key>
66
<array>
7+
<string>$(AppIdentifierPrefix)com.microsoft.workplacejoin</string>
78
<string>$(AppIdentifierPrefix)com.microsoft.MSIDTestsHostApp</string>
89
<string>$(AppIdentifierPrefix)com.microsoft.adalcache</string>
910
<string>$(AppIdentifierPrefix)com.microsoft.intune.mam</string>

IdentityCore/src/MSIDBrokerConstants.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@
2626
NSString *const MSID_BROKER_ADAL_SCHEME = @"msauth";
2727
NSString *const MSID_BROKER_MSAL_SCHEME = @"msauthv2";
2828
NSString *const MSID_BROKER_NONCE_SCHEME = @"msauthv3";
29-
NSString *const MSID_BROKER_APP_BUNDLE_ID = @"com.microsoft.azureauthenticator";
30-
NSString *const MSID_BROKER_APP_BUNDLE_ID_DF = @"com.microsoft.azureauthenticator-df";
29+
#if TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST
30+
NSString *const MSID_BROKER_APP_BUNDLE_ID = @"com.microsoft.azureauthenticator";
31+
NSString *const MSID_BROKER_APP_BUNDLE_ID_DF = @"com.microsoft.azureauthenticator-df";
32+
#elif TARGET_OS_OSX
33+
NSString *const MSID_BROKER_APP_BUNDLE_ID = @"com.microsoft.CompanyPortalMac";
34+
NSString *const MSID_BROKER_APP_BUNDLE_ID_DF = @"com.microsoft.CompanyPortalMac";
35+
#endif
3136
NSString *const MSID_BROKER_MAX_PROTOCOL_VERSION = @"max_protocol_ver";
3237
NSString *const MSID_BROKER_PROTOCOL_VERSION_KEY = @"msg_protocol_ver";
3338
NSInteger const MSID_BROKER_PROTOCOL_VERSION_2 = 2;

IdentityCore/src/MSIDOAuth2Constants.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ extern NSString *const MSID_LAST_MOD_TIME_CACHE_KEY;
123123
extern NSString *const MSID_LAST_MOD_APP_CACHE_KEY;
124124
extern NSString *const MSID_APPLICATION_IDENTIFIER_CACHE_KEY;
125125
extern NSString *const MSID_DEVICE_ID_CACHE_KEY;
126+
extern NSString *const MSID_PRT_PROTOCOL_VERSION_CACHE_KEY;
126127

127128
extern NSString *const MSID_ACCESS_TOKEN_CACHE_TYPE;
128129
extern NSString *const MSID_ACCOUNT_CACHE_TYPE;

IdentityCore/src/MSIDOAuth2Constants.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
NSString *const MSID_PRINCIPAL_ACCOUNT_ENVIRONMENT_CACHE_KEY = @"principal_account_environment";
142142
NSString *const MSID_APP_METADATA_AUTHORITY_MAP_TYPE = @"authority_map";
143143
NSString *const MSID_DEVICE_ID_CACHE_KEY = @"device_id";
144+
NSString *const MSID_PRT_PROTOCOL_VERSION_CACHE_KEY = @"prt_protocol_version";
144145

145146
NSString *const MSID_OPENID_CONFIGURATION_SUFFIX = @".well-known/openid-configuration";
146147
NSString *const MSID_PREFERRED_USERNAME_MISSING = @"Missing from the token response";

IdentityCore/src/broker_operation/response/MSIDDeviceInfo.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#import "MSIDDeviceInfo.h"
2525
#import "MSIDConstants.h"
2626
#import "MSIDWorkPlaceJoinUtil.h"
27-
#import "MSIDRegistrationInformation.h"
2827

2928
static NSArray *deviceModeEnumString;
3029

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// All rights reserved.
3+
//
4+
// This code is licensed under the MIT License.
5+
//
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files(the "Software"), to deal
8+
// in the Software without restriction, including without limitation the rights
9+
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
10+
// copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions :
12+
//
13+
// The above copyright notice and this permission notice shall be included in
14+
// all copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
// THE SOFTWARE.
23+
24+
#import <Foundation/Foundation.h>
25+
26+
@class MSIDAssymetricKeyPair;
27+
@class MSIDAssymetricKeyLookupAttributes;
28+
29+
NS_ASSUME_NONNULL_BEGIN
30+
31+
@protocol MSIDAssymetricKeyGenerating <NSObject>
32+
33+
- (MSIDAssymetricKeyPair *)generateKeyPairForAttributes:(MSIDAssymetricKeyLookupAttributes *)attributes
34+
error:(NSError **)error;
35+
36+
- (MSIDAssymetricKeyPair *)readOrGenerateKeyPairForAttributes:(MSIDAssymetricKeyLookupAttributes *)attributes
37+
error:(NSError **)error;
38+
39+
- (MSIDAssymetricKeyPair *)readKeyPairForAttributes:(MSIDAssymetricKeyLookupAttributes *)attributes
40+
error:(NSError **)error;
41+
42+
@end
43+
44+
NS_ASSUME_NONNULL_END
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// All rights reserved.
3+
//
4+
// This code is licensed under the MIT License.
5+
//
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files(the "Software"), to deal
8+
// in the Software without restriction, including without limitation the rights
9+
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
10+
// copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions :
12+
//
13+
// The above copyright notice and this permission notice shall be included in
14+
// all copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
// THE SOFTWARE.
23+
24+
#import <Foundation/Foundation.h>
25+
#import "MSIDAssymetricKeyGenerating.h"
26+
27+
NS_ASSUME_NONNULL_BEGIN
28+
29+
@interface MSIDAssymetricKeyGeneratorFactory : NSObject
30+
31+
+ (id<MSIDAssymetricKeyGenerating>)defaultKeyGeneratorWithError:(NSError **)error;
32+
33+
@end
34+
35+
NS_ASSUME_NONNULL_END
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// All rights reserved.
3+
//
4+
// This code is licensed under the MIT License.
5+
//
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files(the "Software"), to deal
8+
// in the Software without restriction, including without limitation the rights
9+
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
10+
// copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions :
12+
//
13+
// The above copyright notice and this permission notice shall be included in
14+
// all copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
// THE SOFTWARE.
23+
24+
#import "MSIDAssymetricKeyGeneratorFactory.h"
25+
#import "MSIDAssymetricKeyKeychainGenerator.h"
26+
#if !TARGET_OS_IPHONE
27+
#import "MSIDAssymetricKeyLoginKeychainGenerator.h"
28+
#endif
29+
30+
@implementation MSIDAssymetricKeyGeneratorFactory
31+
32+
+ (id<MSIDAssymetricKeyGenerating>)defaultKeyGeneratorWithError:(NSError **)error
33+
{
34+
#if TARGET_OS_IPHONE
35+
return [self iOSDefaultKeyGeneratorWithError:error];
36+
#else
37+
return [self macDefaultKeyGeneratorWithError:error];
38+
#endif
39+
}
40+
41+
+ (id<MSIDAssymetricKeyGenerating>)iOSDefaultKeyGeneratorWithError:(NSError **)error
42+
{
43+
return [[MSIDAssymetricKeyKeychainGenerator alloc] initWithGroup:nil error:error];
44+
}
45+
46+
#if !TARGET_OS_IPHONE
47+
+ (id<MSIDAssymetricKeyGenerating>)macDefaultKeyGeneratorWithError:(NSError **)error
48+
{
49+
if (@available(macOS 10.15, *))
50+
{
51+
return [[MSIDAssymetricKeyKeychainGenerator alloc] initWithGroup:nil error:error];
52+
}
53+
else
54+
{
55+
return [[MSIDAssymetricKeyLoginKeychainGenerator alloc] initWithAccessRef:nil error:error];
56+
}
57+
}
58+
#endif
59+
60+
@end

0 commit comments

Comments
 (0)