Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition,
- NSURLCredential *credential))completionHandler
- {
- if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust])
- {
- [TSKPinningValidator handleChallenge:challenge completionHandler:completionHandler];
- }
- else
- {
- // Handle alternative (non-SSL) authentication
- NSAssert(@"Unsupported authentication method");
- completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement