Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3804aa2
DE324462 : [iOS][MASFoundation] MASAuthCredentialsJWT should not be r…
Oct 26, 2017
2d8286b
Merge pull request #106 from CAAPIM/DE324462-JWT-AuthCredentials
BobbyWeber Nov 1, 2017
4d7d72f
US416558 : [iOS] SharedStorage API
Nov 7, 2017
940df22
US416558 : [iOS] SharedStorage API
Nov 7, 2017
891ab3d
US416558 : [iOS] SharedStorage API
Nov 8, 2017
e09cee9
US416558 : [iOS] SharedStorage API
Nov 9, 2017
d932fc9
US416558 : [iOS] SharedStorage API
Nov 9, 2017
7f653dd
US416558 : [iOS] SharedStorage API
Nov 9, 2017
ac61eff
US416558 : [iOS] SharedStorage API
Nov 9, 2017
545d1b7
US416558 : [iOS] SharedStorage API
Nov 10, 2017
a0d4bd6
US416558 : [iOS] SharedStorage API
kayliemoa Nov 14, 2017
6d9f042
Merge pull request #109 from CAAPIM/US416558-KeychainStorage
BobbyWeber Nov 17, 2017
572f962
initial code related to browser based authentication
Nov 20, 2017
db7ccbb
added code for explicit login in MASUser class
Nov 21, 2017
a06367b
DE328373 : [iOS][Multi-Server] MAS Set Security Configuration call ge…
kayliemoa Nov 21, 2017
7bc04ed
US416558 : [iOS] SharedStorage API
kayliemoa Nov 21, 2017
e5a8860
US416558 : [iOS] SharedStorage API
kayliemoa Nov 21, 2017
093c5d7
Merge pull request #110 from CAAPIM/US416558-KeychainStorage
BobbyWeber Nov 22, 2017
25184b4
Merge pull request #112 from CAAPIM/DE328373-SecurityConfigurationVal…
BobbyWeber Nov 22, 2017
bb0a2a5
added some code to handle the redirection and load the template
Nov 22, 2017
5baa786
Merge branch 'Stable' of https://github.com/CAAPIM/iOS-MAS-Foundation…
Nov 23, 2017
05a6020
[ADD] Adding new blocks for handling Biometric Registration and Dereg…
Nov 23, 2017
9e1cd57
included review comments - filter the redirection only to BBA , made …
Nov 23, 2017
4e7e185
saved older redirection block if any and set it back after BBA
Nov 24, 2017
92a60c9
handled error case when authorization code is not received
Nov 24, 2017
c48f6c4
improvements and error handling across
Nov 24, 2017
6a086c5
Taken care of all the indentation and spacing and complied to code gu…
Nov 27, 2017
1d8c355
Merge branch 'develop' into BrowserBasedAuthentication
Nov 27, 2017
a1a55ab
US427126 : [iOS] Update SDK Version, and ChangeLog
Nov 27, 2017
56f4ea5
Minor edits
bmckercher Nov 27, 2017
7a0aa8e
Merge pull request #114 from CAAPIM/US427126-SDKVersionUpdateChangeLog
BobbyWeber Nov 27, 2017
d2e6374
Updated link
bmckercher Nov 27, 2017
5b0eea6
Merge pull request #113 from CAAPIM/MASFIDOUIInterface
Nov 28, 2017
601ed95
Merge pull request #116 from CAAPIM/US425261-BrowserBasedAuthentication
BobbyWeber Nov 29, 2017
d7e950a
remove code related to iOS 11 and changed navigation for Safariviewco…
Nov 29, 2017
279e4a0
Merge pull request #117 from CAAPIM/US425261-BrowserBasedAuthentication
Nov 29, 2017
75f7746
checking if the redirect url is good and taking necessary action
Dec 1, 2017
505e3b9
Merge pull request #118 from CAAPIM/US425261-BrowserBasedAuthenticati…
Dec 1, 2017
66b342f
Merge pull request #115 from CAAPIM/iOS-MASFoundation-Link-fix
BobbyWeber Dec 4, 2017
eab6edb
resolving defect where a server does not respond to the authorize cal…
Dec 6, 2017
d25a98c
Merge pull request #119 from CAAPIM/DE332735-BrowserBasedAuthentication
Dec 6, 2017
c26af70
US427126 : Updating ChangeLog.md with reference
Dec 12, 2017
e13a83a
US427126 : Updating ChangeLog.md
Dec 12, 2017
f6b5a18
Merge pull request #120 from CAAPIM/US427126-SDKVersionUpdateChangeLog
Dec 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Version 1.6.00

### Bug fixes
- `MASAuthCredentialsJWT` credentials was marked as re-usable, so the Mobile SDK tried to consume the same credentials for a certain period of time. JWT credentials can now be consumed only one time, and is not reusable. [DE324462]
- Device deregistration was removing all credentials from the Mobile SDK regardless of the result of deregistration request. Now, the Mobile SDK removes credentials only when the deregistration request succeeds. [DE324142]
- Mobile SDK was changing `MASGrantFlow` to client credentials in a specific scenario with Cordova SDK. The Mobile SDK no longer switches the `MASGrantFlow` by itself. [DE311841]
- Mobile SDK enhances the device registration flow so it handles the device registration record more smoothly. This removes the hassle of developers seeing "This device has already been registered and has not been configured to accept updates" error message in development phase. [US406920]
- `MASConfiguration` was not properly updating the updated endpoint values when switching to a different configuration. It is fixed. [DE321925]
- `MASConfiguration` had some hard-coded values for client credentials device registration endpoint. `MASConfiguration` now reads the value from the configuration. [DE321921]
- `MASMQTTClient` was unable to reestablish MQTT connection when the user session was logged out, and logged in with a different account. Mobile SDK now properly handles session changes for MQTT connection. [US408725]
- Mobile SDK now stores all credentials only to the device. Data will not be backed-up or transferred with iCloud unless `[MAS setKeychainSynchroizable:]` is explicitly set to `YES`. [US388853]
- Mobile SDK's MQTT connection was unable to establish mutual SSL connection with public CA certificate. The Mobile SDK now establishes mutual SSL with public CA certificate when **entire certificate chain** is exported in JSON configuration. [US399506]

### New features
- Mobile SDK introduces a secure way of storing and sharing data across multiple applications using same keychain sharing group with MASFoundation's `MASSharedStorage` class. [US416558]
- Mobile SDK introduces a new way of building API CRUD request with `MASRequestBuilder` and `MASRequest` classes to provide seamless developer experience Android SDK. [US374082]

### Deprecated methods
- `[MASConfiguration setSecurityConfiguration:]` is deprecated. Please use `[MASSecurityConfiguration setSecurityConfiguration:error:]` for better handling of error cases when setting the security configuration object. [DE328373]

# Version 1.5.00

NOTE: From this version on the frameworks changed to Dynamic instead of Static library
Expand All @@ -12,14 +32,14 @@ NOTE: From this version on the frameworks changed to Dynamic instead of Static l
- The SDK no longer requires Keychain Sharing to be enabled in Xcode. However, to establish SSO across multiple applications, Keychain Sharing must be enabled. [US320771]
- Mobile SDK now only validates against the leaf certificate for SSL pinning validation by default. The configuration can be changed to validate against entire certificate chain through `MASSecurityConfiguration`. [US374086]

### New Features
### New features
- Mobile SDK introduces an ability to configure security configuration for external APIs (such as SSL pinning), so that Mobile SDK can securely connect to external API (other than primary Gateway). [US344780]
- The SDK handles multiple concurrent API requests with proper authentication processes. [US362800]
- The SDK supports dynamic framework. All you need to do is update your Xcode settings. [US367604]
- The SDK introduces more flexible and extensible authentication with different types of credentials. For details, see `MASAuthCredentials`. [US349497]
- The SDK introduces the ability to digitally sign the request as JWT. See `MASClaims` to sign the request. [US313137]

### Deprecated Methods
### Deprecated methods
- `[MAS setUserLoginBlock:]` is deprecated. Please use `[MAS setAuthCredentials:]` block to perform implicit authentication with `MASAuthCredentials` object.


Expand Down
28 changes: 26 additions & 2 deletions MASFoundation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@
A4F671331BAFC345000E2223 /* NSString+MASPrivate.m in Sources */ = {isa = PBXBuildFile; fileRef = A4F671311BAFC345000E2223 /* NSString+MASPrivate.m */; };
A858C6651D0978A6001FB9AD /* MASOTPService.h in Headers */ = {isa = PBXBuildFile; fileRef = A858C6631D0978A6001FB9AD /* MASOTPService.h */; };
A858C6661D0978A6001FB9AD /* MASOTPService.m in Sources */ = {isa = PBXBuildFile; fileRef = A858C6641D0978A6001FB9AD /* MASOTPService.m */; };
C81CC3CC1FC2EA190058718E /* MASBrowserBasedAuthentication.h in Headers */ = {isa = PBXBuildFile; fileRef = C81CC3CA1FC2EA190058718E /* MASBrowserBasedAuthentication.h */; };
C81CC3CD1FC2EA190058718E /* MASBrowserBasedAuthentication.m in Sources */ = {isa = PBXBuildFile; fileRef = C81CC3CB1FC2EA190058718E /* MASBrowserBasedAuthentication.m */; };
C81CC3D01FC2EFBB0058718E /* UIAlertController+MAS.h in Headers */ = {isa = PBXBuildFile; fileRef = C81CC3CE1FC2EFBB0058718E /* UIAlertController+MAS.h */; };
C81CC3D11FC2EFBB0058718E /* UIAlertController+MAS.m in Sources */ = {isa = PBXBuildFile; fileRef = C81CC3CF1FC2EFBB0058718E /* UIAlertController+MAS.m */; };
CB0A8ADF1D01F64F00B1DCCC /* MASProximityLogin.h in Headers */ = {isa = PBXBuildFile; fileRef = CB0A8ADD1D01F64F00B1DCCC /* MASProximityLogin.h */; settings = {ATTRIBUTES = (Public, ); }; };
CB0A8AE01D01F64F00B1DCCC /* MASProximityLogin.m in Sources */ = {isa = PBXBuildFile; fileRef = CB0A8ADE1D01F64F00B1DCCC /* MASProximityLogin.m */; };
CB0B58591E258C2A00BC0163 /* MASAuthorizationResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = CB0B58571E258C2A00BC0163 /* MASAuthorizationResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand All @@ -310,6 +314,8 @@
CB1907F91C17950700A5EF16 /* MASAccessService.m in Sources */ = {isa = PBXBuildFile; fileRef = CB1907F71C17950700A5EF16 /* MASAccessService.m */; };
CB1C151E1E450109002B31A5 /* NSURL+MASPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = CB1C151C1E450109002B31A5 /* NSURL+MASPrivate.h */; };
CB1C151F1E450109002B31A5 /* NSURL+MASPrivate.m in Sources */ = {isa = PBXBuildFile; fileRef = CB1C151D1E450109002B31A5 /* NSURL+MASPrivate.m */; };
CB1FD14B1FB23701000AFA25 /* MASSharedStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = CB1FD1491FB23701000AFA25 /* MASSharedStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
CB1FD14C1FB23701000AFA25 /* MASSharedStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = CB1FD14A1FB23701000AFA25 /* MASSharedStorage.m */; };
CB2357921F0EF53600D4C420 /* MASURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CB2357901F0EF53600D4C420 /* MASURLSessionManager.h */; };
CB2357931F0EF53600D4C420 /* MASURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CB2357911F0EF53600D4C420 /* MASURLSessionManager.m */; };
CB2357961F0EFDEA00D4C420 /* MASSessionTaskOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = CB2357941F0EFDEA00D4C420 /* MASSessionTaskOperation.h */; };
Expand Down Expand Up @@ -718,6 +724,10 @@
A4F671311BAFC345000E2223 /* NSString+MASPrivate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MASPrivate.m"; sourceTree = "<group>"; };
A858C6631D0978A6001FB9AD /* MASOTPService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASOTPService.h; sourceTree = "<group>"; };
A858C6641D0978A6001FB9AD /* MASOTPService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASOTPService.m; sourceTree = "<group>"; };
C81CC3CA1FC2EA190058718E /* MASBrowserBasedAuthentication.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MASBrowserBasedAuthentication.h; sourceTree = "<group>"; };
C81CC3CB1FC2EA190058718E /* MASBrowserBasedAuthentication.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MASBrowserBasedAuthentication.m; sourceTree = "<group>"; };
C81CC3CE1FC2EFBB0058718E /* UIAlertController+MAS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertController+MAS.h"; sourceTree = "<group>"; };
C81CC3CF1FC2EFBB0058718E /* UIAlertController+MAS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertController+MAS.m"; sourceTree = "<group>"; };
CB0A8ADD1D01F64F00B1DCCC /* MASProximityLogin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASProximityLogin.h; sourceTree = "<group>"; };
CB0A8ADE1D01F64F00B1DCCC /* MASProximityLogin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASProximityLogin.m; sourceTree = "<group>"; };
CB0B58571E258C2A00BC0163 /* MASAuthorizationResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASAuthorizationResponse.h; sourceTree = "<group>"; };
Expand All @@ -735,6 +745,8 @@
CB1907F71C17950700A5EF16 /* MASAccessService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASAccessService.m; sourceTree = "<group>"; };
CB1C151C1E450109002B31A5 /* NSURL+MASPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+MASPrivate.h"; sourceTree = "<group>"; };
CB1C151D1E450109002B31A5 /* NSURL+MASPrivate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+MASPrivate.m"; sourceTree = "<group>"; };
CB1FD1491FB23701000AFA25 /* MASSharedStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MASSharedStorage.h; sourceTree = "<group>"; };
CB1FD14A1FB23701000AFA25 /* MASSharedStorage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MASSharedStorage.m; sourceTree = "<group>"; };
CB2357901F0EF53600D4C420 /* MASURLSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASURLSessionManager.h; sourceTree = "<group>"; };
CB2357911F0EF53600D4C420 /* MASURLSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASURLSessionManager.m; sourceTree = "<group>"; };
CB2357941F0EFDEA00D4C420 /* MASSessionTaskOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASSessionTaskOperation.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1342,6 +1354,10 @@
CB14D2181D02266D004F772E /* MASProximityLoginQRCode.m */,
CBA3EB2C1E945F2400E64D9D /* MASClaims.h */,
CBA3EB2D1E945F2400E64D9D /* MASClaims.m */,
CB1FD1491FB23701000AFA25 /* MASSharedStorage.h */,
CB1FD14A1FB23701000AFA25 /* MASSharedStorage.m */,
C81CC3CA1FC2EA190058718E /* MASBrowserBasedAuthentication.h */,
C81CC3CB1FC2EA190058718E /* MASBrowserBasedAuthentication.m */,
);
path = models;
sourceTree = "<group>";
Expand Down Expand Up @@ -1396,6 +1412,8 @@
A4F6712F1BAFC321000E2223 /* categories */ = {
isa = PBXGroup;
children = (
C81CC3CE1FC2EFBB0058718E /* UIAlertController+MAS.h */,
C81CC3CF1FC2EFBB0058718E /* UIAlertController+MAS.m */,
CB1907ED1C1794F400A5EF16 /* MASIKeyChainStore+MASPrivate.h */,
CB1907EE1C1794F400A5EF16 /* MASIKeyChainStore+MASPrivate.m */,
A483C1FF1BE6D0C5007572CE /* CBCentralManager+MASPrivate.h */,
Expand Down Expand Up @@ -1677,6 +1695,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
CB1FD14B1FB23701000AFA25 /* MASSharedStorage.h in Headers */,
69B7DF6A1F9675600056DD3A /* MASRequestBuilder.h in Headers */,
69B7DF681F9675600056DD3A /* MASRequest.h in Headers */,
CBAFD24C1F2BD46C0034DF02 /* MASSecurityConfiguration.h in Headers */,
Expand Down Expand Up @@ -1717,9 +1736,11 @@
105B2F4B1CA6B3EA0005A2D0 /* ripemd.h in Headers */,
A46F49F11C2F5FC500A4C370 /* MASINTULocationRequestDefines.h in Headers */,
CB5E4C641C1D1B56001B3B8A /* MASGetURLRequest.h in Headers */,
C81CC3CC1FC2EA190058718E /* MASBrowserBasedAuthentication.h in Headers */,
105B2F471CA6B3EA0005A2D0 /* pqueue.h in Headers */,
105B2F371CA6B3EA0005A2D0 /* kssl.h in Headers */,
105B2F511CA6B3EA0005A2D0 /* srtp.h in Headers */,
C81CC3D01FC2EFBB0058718E /* UIAlertController+MAS.h in Headers */,
CBFA70F41F1ED5D6006D025D /* MASSecurityPolicy.h in Headers */,
CBD25AF51E78C47C00DFB47F /* JWTCryptoKeyExtractor.h in Headers */,
105B2F5F1CA6B3EA0005A2D0 /* x509_vfy.h in Headers */,
Expand Down Expand Up @@ -2085,12 +2106,14 @@
A4150EFC1BF16EE200037E27 /* MASKeyChainService.m in Sources */,
A47F12811C1D73530008E3F2 /* MASBluetoothPeripheral.m in Sources */,
CBD25B061E78C47C00DFB47F /* JWTCoding+VersionThree.m in Sources */,
C81CC3D11FC2EFBB0058718E /* UIAlertController+MAS.m in Sources */,
CBD25AED1E78C47C00DFB47F /* JWTAlgorithmDataHolderChain.m in Sources */,
A46F49DA1C2F5FC500A4C370 /* MASINetworkActivityIndicatorManager.m in Sources */,
A4831AAE1BD1A551007B4AE6 /* MASConfiguration.m in Sources */,
CBA3EB2F1E945F2400E64D9D /* MASClaims.m in Sources */,
CBD25B151E7A0A9200DFB47F /* MF_Base64Additions.m in Sources */,
10738A3B1C711C2F00B7E87E /* util_mosq.c in Sources */,
CB1FD14C1FB23701000AFA25 /* MASSharedStorage.m in Sources */,
10E027A71F72B10100EAB103 /* RNEncryptor.m in Sources */,
10738A2F1C711C2F00B7E87E /* read_handle.c in Sources */,
CB9975571EDF5986006CEBB1 /* MASAuthCredentialsClientCredentials.m in Sources */,
Expand Down Expand Up @@ -2144,6 +2167,7 @@
A46F49C51C2F5FC500A4C370 /* MASIHTTPRequestOperation.m in Sources */,
A4150E701BF1643900037E27 /* MASIJSONResponseSerializer+MASPrivate.m in Sources */,
A417BA521BF033C300EC9BCB /* CLLocation+MASPrivate.m in Sources */,
C81CC3CD1FC2EA190058718E /* MASBrowserBasedAuthentication.m in Sources */,
69B7DF6D1F96756B0056DD3A /* MASRequest+MASPrivate.m in Sources */,
A4831AB21BD1A551007B4AE6 /* MASFile.m in Sources */,
CB0B585A1E258C2A00BC0163 /* MASAuthorizationResponse.m in Sources */,
Expand Down Expand Up @@ -2310,7 +2334,7 @@
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1.5.00;
CURRENT_PROJECT_VERSION = 1.6.00;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
Expand Down Expand Up @@ -2355,7 +2379,7 @@
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1.5.00;
CURRENT_PROJECT_VERSION = 1.6.00;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
Expand Down
10 changes: 10 additions & 0 deletions MASFoundation/Classes/MAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@



/**
* Sets Bool indicator of Browser Based Authentication (templatized login) enabled or not for authorization process.
* By default, it is disabled.

@param enable BOOL value indicating whether Browser Based Authentication is enabled or not.
*/
+ (void)enableBrowserBasedAuthentication:(BOOL)enable;



/**
* Sets the gateway monitoring block defined by the GatewayMonitorStatusBlock type.
* This block will be triggered when any change to the current monitoring status
Expand Down
10 changes: 8 additions & 2 deletions MASFoundation/Classes/MAS.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ + (void)setOTPCredentialsBlock:(MASOTPCredentialsBlock)oneTimePassword
}


+ (void)enableBrowserBasedAuthentication:(BOOL)enable
{
[MASModelService setBrowserBasedAuthentication:enable];
}


+ (void)setGatewayMonitor:(MASGatewayMonitorStatusBlock)monitor
{
[MASNetworkingService setGatewayMonitor:monitor];
Expand Down Expand Up @@ -206,7 +212,7 @@ + (void)start:(MASCompletionErrorBlock)completion
//
// If the device is registered, and id_token exists, which means MSSO can be used for this application
//
else if ([MASDevice currentDevice].isRegistered && [[MASAccessService sharedService] getAccessValueStringWithType:MASAccessValueTypeIdToken])
else if ([MASDevice currentDevice].isRegistered && [[MASAccessService sharedService] getAccessValueStringWithStorageKey:MASKeychainStorageKeyIdToken])
{
//
// Make sure to register the client (application)
Expand Down Expand Up @@ -1641,7 +1647,7 @@ + (NSString * _Nullable)signWithClaims:(MASClaims *_Nonnull)claims error:(NSErro
//
// Retrieve private key from registered device's client certificate
//
SecKeyRef pemPrivateRef = [[MASAccessService sharedService] getAccessValueCryptoKeyWithType:MASAccessValueTypePrivateKey];
SecKeyRef pemPrivateRef = [[MASAccessService sharedService] getAccessValueCryptoKeyWithStorageKey:MASKeychainStorageKeyPrivateKey];
NSData *privateKeyData = [NSData converKeyRefToNSData:pemPrivateRef];

return [self signWithClaims:claims privateKey:privateKeyData error:error];
Expand Down
36 changes: 36 additions & 0 deletions MASFoundation/Classes/MASConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,27 @@ typedef void (^MASOTPChannelSelectionBlock)(NSArray *_Nonnull supportedOTPChanne
typedef void (^MASOTPCredentialsBlock)(MASOTPFetchCredentialsBlock _Nonnull otpBlock, NSError *_Nullable otpError);


/**
* The Selected Biometric modalities (NSArray *_Nullable biometricModalities, BOOL cancel, MASCompletionErrorBlock _Nullable)
* block.
*/
typedef void (^MASBiometricModalitiesBlock)(NSArray *_Nullable biometricModalities, BOOL cancel, MASCompletionErrorBlock _Nullable);


/**
* The Biometric registration with available modalities (NSArray *_Nonnull availableModalities, MASBiometricModalitiesBlock
* _Nonnull biometricModalitiesBlock) block.
*/
typedef void (^MASBiometricRegistrationModalitiesSelectionBlock)(NSArray *_Nonnull availableModalities, MASBiometricModalitiesBlock _Nonnull biometricModalitiesBlock);


/**
* The Biometric deregistration with available modalities (NSArray *_Nonnull availableModalities, MASBiometricModalitiesBlock
* _Nonnull biometricModalitiesBlock) block.
*/
typedef void (^MASBiometricDeregistrationModalitiesSelectionBlock)(NSArray *_Nonnull availableModalities, MASBiometricModalitiesBlock _Nonnull biometricModalitiesBlock);


///--------------------------------------
/// @name MAS Constants
///--------------------------------------
Expand Down Expand Up @@ -329,6 +350,12 @@ typedef NS_ENUM(NSInteger, MASFoundationErrorCode)
MASFoundationErrorCodeConfigurationLoadingFailedJsonValidation = 100203,
MASFoundationErrorCodeConfigurationInvalidEndpoint = 100204,

//
// Security Configuration
//
MASFoundationErrorCodeConfigurationInvalidHostForSecurityConfiguration = 100211,
MASFoundationErrorCodeConfigurationInvalidPinningInfoForSecurityConfiguration = 100212,

//
// Geolocation
//
Expand Down Expand Up @@ -459,6 +486,15 @@ typedef NS_ENUM(NSInteger, MASFoundationErrorCode)
MASFoundationErrorCodeJWTUnexpectedClassType = 170002,
MASFoundationErrorCodeJWTSerializationError = 170003,

//
// Browser Based Login
//
MASFoundationErrorCodeBBANotEnabled = 180000,
//
// SharedStorage
//
MASFoundationErrorCodeSharedStorageNotNilKey = 180001,

MASFoundationErrorCodeCount = -999999
};

Expand Down
2 changes: 1 addition & 1 deletion MASFoundation/Classes/MQTT/MASMQTTHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ + (void)showLogMessage:(NSString *)message debugMode:(BOOL)debugMode

+ (NSString *)mqttClientId
{
NSString *magIdentifier = [[MASAccessService sharedService] getAccessValueStringWithType:MASAccessValueTypeMAGIdentifier];
NSString *magIdentifier = [[MASAccessService sharedService] getAccessValueStringWithStorageKey:MASKeychainStorageKeyMAGIdentifier];

//MQTT ClientId is: <mag_identifier>::<mag_client_id>::<SCIM userID>
NSString *clientId = [NSString stringWithFormat:@"%@::%@::%@",magIdentifier,[MASApplication currentApplication].identifier,[MASUser currentUser].objectId];
Expand Down
5 changes: 5 additions & 0 deletions MASFoundation/Classes/_private_/MASConstantsPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ static NSString *_Nonnull const MASGrantTypeRefreshToken = @"refresh_token"; //
static int const MASExceptionErrorCodeInvalidCertificate = 9999; // integer


# pragma mark - MASSharedStorage custom prefix

static NSString *_Nonnull const MASSharedStorageCustomPrefix = @"MAS.customSharedStorage";


///--------------------------------------
/// @name Location Monitoring Constants
///--------------------------------------
Expand Down
Loading