Conversation Manager API Usage for iOS
The conversation manager instance usually cannot be used immediately to execute requests; it must first be configured to handle common authentication flows such as basic authentication.
Responding to Authentication Challenges
assign authentication challenge filters to a manager instance to
respond to authentication challenges. Use the
addChallengeFilter: API to assign one or more
challenge filters to a given manager instance.
Challenge Filter classes must adhere to the ChallengeFilterProtocol, which declares a delegate method that is called whenever an authentication challenge occurs during request execution:
The delegate method should supply valid credentials in its completion block and set useCredential to YES (if set to NO or the credential is nil, it is interpreted as if no credential is provided.)
the HttpConvAuthFlows library provides a set of authentication
providers that can be used as an alternative to implementing challenge
A CommonAuthenticationConfigurator instance must first be created, followed by setting the required providers and implementing specific delegates. In this example the manager instance is set up to retrieve user credentials from the implementing class:You must also implement the corresponding UsernamePasswordProviderProtocol delegate - provideUsernamePasswordForAuthChallenge:completionBlock: