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

Getting a class implementing MSALSerializedADALCacheProviderDelegate

Data serialization

  • 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

Configure MSALSerializedADALCacheProvider

  • Initializes MSALSerializedADALCacheProvider with a delegate.

    Declaration

    Objective-C

    - (nullable instancetype)
        initWithDelegate:
            (nonnull id<MSALSerializedADALCacheProviderDelegate>)delegate
                   error:(NSError *_Nullable *_Nullable)error;

    Swift

    init(delegate: any MSALSerializedADALCacheProviderDelegate) throws

    Parameters

    delegate

    Class implementing MSALSerializedADALCacheProviderDelegate protocol that is responsible for persistence and management of ADAL cache

    error

    Error if present