27 #import <Foundation/Foundation.h>
28 #import <Security/Security.h>
38 AGSCredentialErrorTypeNone = 0,
39 AGSCredentialErrorTypeInvalidCredentials ,
40 AGSCredentialErrorTypeSSLRequired ,
41 AGSCredentialErrorTypeUnknown
55 #pragma mark properties
60 @property (nullable, nonatomic, copy) NSString *
username;
65 @property (nullable, nonatomic, copy) NSString *
password;
70 @property (nullable, nonatomic, strong) NSURL *
tokenUrl;
75 @property (nullable, nonatomic, copy, readonly) NSString *
referer;
81 @property (nullable, nonatomic, copy) NSString *
token;
86 @property (nullable, nonatomic, assign) SecIdentityRef
identity;
91 @property (nonatomic, assign, readwrite, getter=isCachingEnabled) BOOL
cachingEnabled;
104 #pragma mark initializers
112 - (instancetype)initWithUser:(NSString*)username password:(NSString*)password;
119 - (instancetype)initWithIdentityRef:(SecIdentityRef)identityRef;
127 - (instancetype)initWithToken:(NSString*)token referer:(nullable NSString*)referer;
135 - (nullable instancetype)initWithIdentityCertificateData:(NSData *)data password:(NSString *)password;
143 + (instancetype)credentialWithUser:(NSString*)username password:(NSString*)password;
160 + (nullable NSArray<id>*)identitiesForProtectionSpace:(nullable NSURLProtectionSpace*)protectionSpace ;
177 + (nullable SecIdentityRef)importCertificateData:(NSData*)data password:(NSString*)password overwrite:(BOOL)overwrite error:(NSError**)error ;
189 + (OSStatus)removeIdentityFromKeychain:(SecIdentityRef)identityRef ;
Represents an credential to access a secured resource.
Definition: AGSCredential.h:52
NSString * identityCertificatePassword
Definition: AGSCredential.h:101
NSURL * tokenUrl
Definition: AGSCredential.h:70
NSString * username
Definition: AGSCredential.h:60
SecIdentityRef identity
Definition: AGSCredential.h:86
NSString * referer
Definition: AGSCredential.h:75
NSString * token
Definition: AGSCredential.h:81
BOOL cachingEnabled
Definition: AGSCredential.h:91
NSString * password
Definition: AGSCredential.h:65
nullable NSString * authenticatingHost()
NSData * identityCertificateData
Definition: AGSCredential.h:96