MSALPublicClientApplicationConfig
Objective-C
@interface MSALPublicClientApplicationConfig : NSObject <NSCopying>
Swift
class MSALPublicClientApplicationConfig : NSObject, NSCopying
Configuration for an instance of MSALPublicClientApplication
Note
OnceMSALPublicClientApplication
is initialized, MSALPublicClientApplication object ignores any changes you make to the MSALPublicClientApplicationConfig object.
-
The client ID of the application, this should come from the app developer portal.
Declaration
Objective-C
@property NSString *_Nonnull clientId;
Swift
var clientId: String { get set }
-
The redirect URI of the application
Declaration
Objective-C
@property (nullable) NSString *redirectUri;
Swift
var redirectUri: String? { get set }
-
The client ID of the nested application.
Declaration
Objective-C
@property NSString *_Nonnull nestedAuthBrokerClientId;
Swift
var nestedAuthBrokerClientId: String { get set }
-
The redirect URI of the nested application
Declaration
Objective-C
@property (nullable) NSString *nestedAuthBrokerRedirectUri;
Swift
var nestedAuthBrokerRedirectUri: String? { get set }
-
The authority the application will use to obtain tokens
Declaration
Objective-C
@property MSALAuthority *_Nonnull authority;
Swift
var authority: MSALAuthority { get set }
-
List of known authorities that application should trust. Note that authorities listed here will bypass authority validation logic. Thus, it is advised not putting dynamically resolving authorities here.
Declaration
Objective-C
@property (nonatomic) NSArray<MSALAuthority *> *_Nonnull knownAuthorities;
Swift
var knownAuthorities: [MSALAuthority] { get set }
-
Enable to return access token with extended lifetime during server outage.
Declaration
Objective-C
@property BOOL extendedLifetimeEnabled;
Swift
var extendedLifetimeEnabled: Bool { get set }
-
List of additional STS features that client handles.
Declaration
Objective-C
@property (nullable) NSArray<NSString *> *clientApplicationCapabilities;
Swift
var clientApplicationCapabilities: [String]? { get set }
-
Time in seconds controlling how long before token expiry MSAL refreshes access tokens. When checking an access token for expiration we check if time to expiration is less than this value (in seconds) before making the request. The goal is to refresh the token ahead of its expiration and also not to return a token that is about to expire.
Declaration
Objective-C
@property (nonatomic) double tokenExpirationBuffer;
Swift
var tokenExpirationBuffer: Double { get set }
-
Used to specify query parameters that must be passed to both the authorize and token endpoints to target MSAL at a specific test slice & flight. These apply to all requests made by an application.
Declaration
Objective-C
@property (nullable) MSALSliceConfig *sliceConfig;
Swift
var sliceConfig: MSALSliceConfig? { get set }
-
MSAL configuration interface responsible for token caching and keychain configuration. Refer to
MSALCacheConfig
for more detailsDeclaration
Objective-C
@property (readonly) MSALCacheConfig *_Nonnull cacheConfig;
Swift
var cacheConfig: MSALCacheConfig { get }
-
For clients that support multiple national clouds, set this to YES. NO by default. If set to YES, the Microsoft identity platform will automatically redirect user to the correct national cloud during the authorization flow. You can determine the national cloud of the signed-in account by examining the authority associated with the MSALResult. Note that the MSALResult doesn’t provide the national cloud-specific endpoint address of the resource for which you request a token.
Note
Your client_id needs to be registered in national clouds for this feature to work.Declaration
Objective-C
@property (nonatomic) BOOL multipleCloudsSupported;
Swift
var multipleCloudsSupported: Bool { get set }
-
Initialize a MSALPublicClientApplicationConfig with a given clientId
Declaration
Objective-C
- (nonnull instancetype)initWithClientId:(nonnull NSString *)clientId;
Swift
init(clientId: String)
Parameters
clientId
The clientID of your application, you should get this from the app portal.
-
For client that wants to bypass redirectURI check in MSAL, set this to YES. NO by default. If set to YES, MSAL will skip the verification of redirectURI. Brokered authentication will be disabled in this case.
Declaration
Objective-C
@property BOOL bypassRedirectURIValidation;
Swift
var bypassRedirectURIValidation: Bool { get set }
-
Initialize a MSALPublicClientApplicationConfig with a given clientId
Declaration
Objective-C
- (nonnull instancetype)initWithClientId:(nonnull NSString *)clientId redirectUri:(nullable NSString *)redirectUri authority:(nullable MSALAuthority *)authority;
Swift
init(clientId: String, redirectUri: String?, authority: MSALAuthority?)
Parameters
clientId
The clientID of your application, you should get this from the app portal.
redirectUri
The redirect URI of the application
authority
The target authority
-
Initialize a MSALPublicClientApplicationConfig with a given clientId and a nested clientid
Declaration
Objective-C
- (nonnull instancetype)initWithClientId:(nonnull NSString *)clientId redirectUri:(nullable NSString *)redirectUri authority:(nullable MSALAuthority *)authority nestedAuthBrokerClientId: (nullable NSString *)nestedAuthBrokerClientId nestedAuthBrokerRedirectUri: (nullable NSString *)nestedAuthBrokerRedirectUri;
Swift
init(clientId: String, redirectUri: String?, authority: MSALAuthority?, nestedAuthBrokerClientId: String?, nestedAuthBrokerRedirectUri: String?)
Parameters
clientId
The clientID of your application, you should get this from the app portal.
redirectUri
The redirect URI of the application
authority
The target authority
nestedAuthBrokerClientId
The clientID of your child application
nestedAuthBrokerRedirectUri
The redirect URI of the child application
-
Unavailable
Use
[MSALPublicClientApplicationConfig initWithClientId:redirectUri:authority]
insteadDeclaration
Objective-C
- (nonnull instancetype)init;
-
Unavailable
Use
[MSALPublicClientApplicationConfig initWithClientId:redirectUri:authority]
insteadDeclaration
Objective-C
+ (nonnull instancetype)new;