MSALSerializedADALCacheProvider
Objective-C
@interface MSALSerializedADALCacheProvider : NSObject <NSCopying>
Swift
class MSALSerializedADALCacheProvider : NSObject, NSCopying
Representation of ADAL serialized cache. Use it to achieve SSO or migration scenarios between ADAL Objective-C for macOS and MSAL for macOS
-
Delegate of MSALSerializedADALCacheProvider is responsible for storing and reading serialized ADAL cache to the disk (e.g. keychain).
Declaration
Objective-C
@property (nonatomic, readonly, nonnull) id<MSALSerializedADALCacheProviderDelegate> delegate;
Swift
var delegate: MSALSerializedADALCacheProviderDelegate { get }
-
Serializes current in-memory representation of ADAL cache into NSData
Declaration
Objective-C
- (nullable NSData *)serializeDataWithError: (NSError *_Nullable *_Nullable)error;
Swift
func serializeData() throws -> Data
Parameters
error
Error if present
-
Deserializes NSData into in-memory representation of ADAL cache
Declaration
Objective-C
- (BOOL)deserialize:(nonnull NSData *)serializedData error:(NSError *_Nullable *_Nullable)error;
Swift
func deserialize(_ serializedData: Data) throws
Parameters
serializedData
Serialized ADAL cache
error
Error if present
-
Initializes MSALSerializedADALCacheProvider with a delegate.
Declaration
Objective-C
- (nullable instancetype) initWithDelegate: (nonnull id<MSALSerializedADALCacheProviderDelegate>)delegate error:(NSError *_Nullable *_Nullable)error;
Swift
init(delegate: MSALSerializedADALCacheProviderDelegate) throws
Parameters
delegate
Class implementing MSALSerializedADALCacheProviderDelegate protocol that is responsible for persistence and management of ADAL cache
error
Error if present