Questions tagged [nsurlcredential]

NSURLCredential is an immutable object representing an authentication credential consisting of authentication information specific to the type of credential and the type of persistent storage to use, if any.

67 questions
25
votes
6 answers

Basic Authentication with Alamofire

Experiencing an issue when authenticating with Basic Auth. I am using a standard enum that conforms to URLRequestConvertible protocol to construct my requests. The issue is that when I manually set the authorization headers in the enum like so: …
17
votes
1 answer

AFNetworking with NSURLCredential

I have 3 methods, UserLogin, Login and LogoutButtonPressed: UserLogin: I am using AFNetworking to connect to a Windows Authenticated URL using NSURLCredential: -(void)UserLogin:(NSString *)user andPassWordExists:(NSString *)password…
user979331
  • 11,039
  • 73
  • 223
  • 418
16
votes
6 answers

Can't reauthenticate with different NSURLCredentials (old deleted ones are used)

i've been searching stackoverflow, google, apple and other places. The tips provided look promising, i implemented them but alltogether don't seem to work or get enforced. Problem: I have an NSURLConnection with specific credentials. I then have a…
Mike F
  • 1,224
  • 4
  • 26
  • 44
11
votes
2 answers

objective-c clear NSURLCredential - NSURLCredentialPersistenceForSession

I am using NSURLCredentials in this method: -(void)UserLogin:(NSString *)user andPassWordExists:(NSString *)password completionHandler:(void (^)(NSArray *resultsObject, NSError *error))completionHandler { NSURL *url = [NSURL…
user979331
  • 11,039
  • 73
  • 223
  • 418
10
votes
3 answers

NSURLErrorDomain error -1012

I need to parse a xml file from a password protected URL I tried the following NSURLCredential *credential = [NSURLCredential credentialWithUser:@"admin" password:@"123456" persistence:NSURLCredentialPersistenceForSession]; NSURLProtectionSpace…
Piyush
  • 244
  • 1
  • 2
  • 8
8
votes
1 answer

iOS: Playing video that needs authentication works in QuickLook but not in MPMoviePlayerViewController

I login to my server using a SOAP web service. Once logged in, many of the files that I am viewing are only available to the logged in user, so iOS must create a session in NSURL or something. When trying to preview a video file using…
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412
8
votes
1 answer

NSURLConnection, NSURLRequest, untrusted cert and user authentication

Morning Everyone, I've been attempting to write an application that does some GETs from a remote Web Service that requires authentication. My main problem is that the majority of these remote servers (and there are a lot of them) don't have valid…
Staros
  • 3,232
  • 6
  • 30
  • 41
6
votes
1 answer

Not able to do authentication using client certificate in iPhone

team, I have .net based REST service configured with 2-way SSL. In my iphone side, i have installed the server certificate in the device profiles and client certificate is bundled as application resource. Server certificate validation is working…
shatthi
  • 656
  • 3
  • 10
  • 23
6
votes
3 answers

Clear the credentials from UIWebView

What i am doing here is, fetching a URL which has authentication. Hence, i use the function - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; When it faces…
mayuur
  • 4,736
  • 4
  • 30
  • 65
6
votes
0 answers

How does (NSURLCredential *) proposedCredential in iOS work?

Morning I've been working on creating a iOS application that uses stored credentials in NSURLCredentialStorage for a specific protectionspace. I've now gotten to the point where I'm using proposedCredential to fetch the stored credentials. My…
Hrafn
  • 2,867
  • 3
  • 25
  • 44
5
votes
1 answer

NSURLCredential creation returning null

I am trying to create a NSURLCredential by using the +credentialWithIdentity:certificates:persistence: method. However it's returning nil. I've done the following steps. First I create a private and public key, then generated a certificate and add…
4
votes
3 answers

NSURLConnection does not use the default credential

I'm trying to connect to http://cmis.demo.nuxeo.org/nuxeo/atom/cmis/ with NSURLConnection. This demo web service is documented to require authentication (login: Administrator / password: Administrator). Edit: This web service now sends an…
0xced
  • 25,219
  • 10
  • 103
  • 255
4
votes
2 answers

how to authenticate the proxy in urlsession?

Hi I'm trying to add proxy with credentials to my App but whenever I'm tried, I got following (In Xcode) console warning: *** WARNING: CFMachPortSetInvalidationCallBack() called on a CFMachPort with a Mach port (0x900b) which does not have any send…
Lion
  • 872
  • 1
  • 17
  • 43
4
votes
1 answer

iOS: is NSURLAuthenticationChallenge send encrypted credentials over the network?

My iOS app is connecting to the Sharepoint web service and Sharepoint is used NTLM authentication. At my side i have implemented below code for NTLM authentication: - (void)connection:(NSURLConnection *)connection…
Nikh1414
  • 1,238
  • 2
  • 19
  • 35
4
votes
1 answer

MediaPlayer.framework (MPMoviePlayerController) playing movie from URL that requires access credentials

i am having problems with playing movie from URL that has basic http authentification. Here is code: NSURLCredential *credential = [[NSURLCredential alloc] initWithUser:@"user" …
Moze
  • 333
  • 2
  • 15
1
2 3 4 5