Type Method

credentialWithUser:password:persistence:

Creates and returns an NSURLCredential object for internet password authentication with a given user name and password using a given persistence setting.

Declaration

+ (NSURLCredential *)credentialWithUser:(NSString *)user password:(NSString *)password persistence:(NSURLCredentialPersistence)persistence;

Parameters

user

The user for the credential.

password

The password for user.

persistence

The persistence setting for the credential.

Return Value

An NSURLCredential object with user name user, password password, and using persistence setting persistence.

Discussion

If persistence is NSURLCredentialPersistencePermanent the credential is stored in the keychain.

See Also

Creating a credential

credentialForTrust:

Creates and returns an NSURLCredential object for server trust authentication with a given accepted trust.

credentialWithIdentity:certificates:persistence:

Creates and returns an NSURLCredential object for client certificate authentication with a given identity and a given array of client certificates using a given persistence setting.

initWithIdentity:certificates:persistence:

Returns an NSURLCredential object for client certificate authentication initialized with a given identity and a given array of client certificates using a given persistence setting.

initWithTrust:

Returns an NSURLCredential object for server trust authentication initialized with a given accepted trust.

initWithUser:password:persistence:

Returns an NSURLCredential object initialized with a given user name and password using a given persistence setting.