ArcGIS Runtime SDK for iOS: AGSCredentialCache.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSCredentialCache.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2022 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24  //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <ArcGIS/AGSKeychainItem.h>
29 
30 
31 
32 @class AGSCredential;
33 
42 @interface AGSCredentialCache : NSObject<NSCoding>
43 
44 #pragma mark -
45 #pragma mark initializers
46 
47 
48 
49 #pragma mark -
50 #pragma mark properties
51 
56 @property (nonatomic, assign, readonly) BOOL autoSyncToKeychain;
57 
62 @property (nullable, nonatomic, strong, readonly) AGSKeychainItem *keychainItem;
63 
64 #pragma mark -
65 #pragma mark methods
66 
70 - (void)removeAllCredentials;
71 
78 - (void)enableAutoSyncToKeychainWithIdentifier:(NSString*)identifier accessGroup:(nullable NSString*)accessGroup acrossDevices:(BOOL)acrossDevices;
79 
80 
88 - (void)enableAutoSyncToKeychainWithIdentifier:(NSString*)identifier accessGroup:(nullable NSString*)accessGroup acrossDevices:(BOOL)acrossDevices accessible:(AGSKeychainItemAccessible)accessible;
89 
90 
95 
99 +(void)removeFromKeychainWithIdentifier:(NSString*)identifier completion:(nullable void(^)(NSError * __nullable error))completion;
100 
111 -(void)removeAndRevokeCredential:(AGSCredential*)credential
112  completion:(nullable void(^)(NSError * __nullable error))completion;
113 
123 -(void)removeAndRevokeAllCredentialsWithCompletion:(nullable void(^)(NSDictionary<AGSCredential *, NSError *> *results))completion;
124 
125 @end
126 
127 
AGSKeychainItemAccessible
Definition: AGSKeychainItem.h:35
A cache containing credentials to reuse.
Definition: AGSCredentialCache.h:42
BOOL autoSyncToKeychain
Definition: AGSCredentialCache.h:56
AGSKeychainItem * keychainItem
Definition: AGSCredentialCache.h:62
void disableAutoSyncToKeychain()
Represents an credential to access a secured resource.
Definition: AGSCredential.h:52
A convenience class to store and retrieve objects in the keychain.
Definition: AGSKeychainItem.h:55