Class: NSURLAuthenticationChallenge

Inherits:
NSObject show all

Overview

Returns the NSError object representing the last authentication failure.

Instance Method Summary (collapse)

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Method Details

- (NSError) error

Returns the NSError object representing the last authentication failure.

This method returns nil if the protocol doesn’t use errors to indicate an authentication failure.

Returns:

- (NSURLResponse) failureResponse

Returns the NSURLResponse object representing the last authentication failure.

This method will return nil if the protocol doesn’t use responses to indicate an authentication failure.

Returns:

- (Object) initWithAuthenticationChallenge(challenge, sender:sender)

Returns an initialized NSURLAuthenticationChallenge object copying the properties from challenge, and setting the authentication sender to sender.

Returns:

- (Object) initWithProtectionSpace(space, proposedCredential:credential, previousFailureCount:count, failureResponse:response, error:error, sender:sender)

Returns an initialized NSURLAuthenticationChallenge object for the specified space using the credential, or nil if there is no proposed credential.

The previous failure count is set to count. The response should contain the NSURLResponse for the authentication failure, or nil if it is not applicable to the challenge. The error should contain the NSError for the authentication failure, or nil if it is not applicable to the challenge. The object that initiated the authentication challenge is set to sender.

Returns:

- (Integer) previousFailureCount

Returns the receiver’s count of failed authentication attempts.

Returns:

- (NSURLCredential) proposedCredential

Returns the proposed credential for this challenge.

This method will return nil if there is no default credential for this challenge.If you have previously attempted to authenticate and failed, this method returns the most recent failed credential.If the proposed credential is not nil and returns YES when sent the message hasPassword, then the credential is ready to use as-is. If the proposed credential returns NO for hasPassword, then the credential provides a default user name and the client must prompt the user for a corresponding password.

Returns:

- (NSURLProtectionSpace) protectionSpace

Returns the receiver’s protection space.

- (Object) sender

Returns the receiver’s sender.

The sender should be sent a useCredential:forAuthenticationChallenge:, continueWithoutCredentialForAuthenticationChallenge: or cancelAuthenticationChallenge: when the client is finished processing the authentication challenge.

Returns: