MSALSilentTokenParameters

Objective-C

@interface MSALSilentTokenParameters : MSALTokenParameters

Swift

class MSALSilentTokenParameters : MSALTokenParameters

Token parameters to be used when MSAL is getting a token silently.

Configuring MSALSilentTokenParameters

  • Ignore any existing access token in the cache and force MSAL to get a new access token from the service.

    Declaration

    Objective-C

    @property (nonatomic) BOOL forceRefresh;

    Swift

    var forceRefresh: Bool { get set }
    1. When Sso Extension is presenting on the device Default is YES. when Sso Extension failed to return a (new) access token, tries with existing refresh token in the cache, and return results. If set to NO, when Sso Extension failed to return a (new) access token, ignores existing refresh token in local cahce, and return Sso Extension error.
    2. When Sso Extension is not presenting on the device This parameter is ignored, and tries with existing refresh token in the cache.

    Declaration

    Objective-C

    @property (nonatomic) BOOL allowUsingLocalCachedRtWhenSsoExtFailed;

    Swift

    var allowUsingLocalCachedRtWhenSsoExtFailed: Bool { get set }

Constructing MSALSilentTokenParameters

  • Initialize a MSALSilentTokenParameters with scopes and account.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithScopes:(nonnull NSArray<NSString *> *)scopes
                                   account:(nonnull MSALAccount *)account;

    Swift

    init(scopes: [String], account: MSALAccount)

    Parameters

    scopes

    Permissions you want included in the access token received in the result in the completionBlock. Not all scopes are guaranteed to be included in the access token returned.

    account

    An account object retrieved from the MSALResult object that MSAL should return a token for.

  • Unavailable

    Initialize a MSALSilentTokenParameters with scopes and account.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithScopes:(nonnull NSArray<NSString *> *)scopes;

    Parameters

    scopes

    Permissions you want included in the access token received in the result in the completionBlock. Not all scopes are guaranteed to be included in the access token returned.