MSALNativeAuthRequestInterceptor
@objc
public protocol MSALNativeAuthRequestInterceptor : NSObjectProtocol
Undocumented
-
Called before each native auth network request, allowing you to inject custom HTTP header fields.
Important
completionBlockmust always be called, regardless of whether additional headers are needed.- If no additional headers are required, call
completionBlock(nil). - If additional headers are needed, inspect
requestUrlto determine the request path and callcompletionBlockwith a[String: String]dictionary of headers to inject.
Note
All custom header field names must start with the
"x-"prefix. The prefixes"x-ms-","x-client-","x-broker-", and"x-app-"are reserved and must not be used.Declaration
Swift
func addAdditionalHeaderFields(_ requestUrl: URL?, completionBlock: @escaping MSALNativeAuthRequestInterceptorAddHeaderCompletionBlock)Parameters
requestUrlThe URL of the outgoing request. Use this to conditionally apply headers per endpoint.
completionBlockMust be called with a header dictionary, or
nilif no extra headers are needed. - If no additional headers are required, call
View on GitHub