MSALCacheConfig

Objective-C

@interface MSALCacheConfig : NSObject <NSCopying>

Swift

class MSALCacheConfig : NSObject, NSCopying

MSAL configuration interface responsible for token caching and keychain configuration.

Configure keychain sharing

Extend MSAL account cache

  • List of external account storage providers that helps you to combine your own accounts with MSAL accounts and use a consistent API for the account management and enumeration. Each external account provider is responsible for retrieving, enumerating, updating and removing external accounts. Some examples where this might be useful:

    1. An app is migrating from ADAL to MSAL. Because ADAL didn’t support account enumeration, developer built a separate layer to store ADAL accounts in the app. MSAL provides account enumeration built-in. Using this API, application can let MSAL combine multiple sources of accounts and operate on a single source.
    2. An app duplicates MSAL accounts in its own account storage with some additional app specific data. Every time when MSAL retrieves/updates an account, application wants to synchronize that account into its own account store.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<id<MSALExternalAccountProviding>> *_Nonnull externalAccountProviders;

    Swift

    var externalAccountProviders: [MSALExternalAccountProviding] { get }
  • Adds a new external account storage provider to be used by MSAL in account retrieval.

    Note

    This operation is not thread safe.

    Declaration

    Objective-C

    - (void)addExternalAccountProvider:
        (nonnull id<MSALExternalAccountProviding>)externalAccountProvider;

    Swift

    func addExternalAccountProvider(_ externalAccountProvider: MSALExternalAccountProviding)

Unavailable initializers