NSURLCredential: add stub for keychain-stored credential

Declare the NSURLCredentialPersistenceSynchronizable enumeration case to
NSURLCredential persistence options. Since GNUstep does not support
iCloud synchronization for credentials, this case will default to
NSURLCredentialPersistencePermanent.
This commit is contained in:
Daniel Ferreira 2017-06-21 10:02:25 +10:00 committed by Ivan Vučica
parent 814c19ecce
commit 8bd630f004
2 changed files with 8 additions and 1 deletions

View file

@ -42,7 +42,9 @@ extern "C" {
typedef enum {
NSURLCredentialPersistenceNone, /** Don't save at all */
NSURLCredentialPersistenceForSession, /** Save for current session */
NSURLCredentialPersistencePermanent /** Save forever (on disk) */
NSURLCredentialPersistencePermanent, /** Save forever (on disk) */
NSURLCredentialPersistenceSynchronizable
} NSURLCredentialPersistence;

View file

@ -110,6 +110,11 @@ typedef struct {
}
if ((self = [super init]) != nil)
{
if (persistence == NSURLCredentialPersistenceSynchronizable)
{
persistence = NSURLCredentialPersistencePermanent;
}
this->user = [user copy];
this->password = [password copy];
this->persistence = persistence;