NSURLcredentialStorage 공식 문서 읽기
Overview
NSURLcredentialStorage는 자격 증명 저장소를 관리하는 단일 예(공유 객체)입니다.
Symbols
Getting the Credential Storage
@property(class, readonly, strong) NSURLCredentialStorage *sharedCredentialStorage
공유된 URL 인증서 저장소로 돌아가기;Getting and Setting Default Credentials
- (NSURLCredential *)defaultCredentialForProtectionSpace:(NSURLProtectionSpace *)space
는 지정된 보호 공간에 대한 기본 자격 증명을 반환합니다.없으면 nil로 돌아가기;- (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space
지정된 보호 공간에 대한 기본 자격 증명을 설정합니다. 지정된 보호 공간에 저장소에 자격 증명이 없으면 이 자격 증명이 추가됩니다.Adding and Removing Credentials
- (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space
창고에서 지정한 안전 공간의 지정 인증서를 삭제한다.- (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space options:(NSDictionary *)options
주어진 옵션을 사용하여 창고에서 지정한 안전 공간의 지정한 인증서를 삭제합니다.options: 인증서를 삭제할 때 고려할 옵션을 포함하는 사전입니다.인증서의persistence가 NSURLcredentialPersistenceSynchronizable일 때만 이 옵션을 사용할 수 있습니다.이 정책을 사용하는 NSURLcredential 객체를 삭제하면 자격 증명을 포함하는 모든 디바이스의 자격 증명이 삭제됩니다.- (void)setCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space
에 지정된 안전 공간에 인증서를 추가한다.동일한 사용자 이름의 인증서가 이미 있는 경우 교체@property(readonly, copy) NSDictionary *> *allCredentials
사용 가능한 모든 안전 공간의 인증서;사전에는 NSURLProtectionSpace 대상의 키와 그에 대응하는 값이 있다.값은 사전이며 키는 사용자 이름 문자열이며 값은 해당하는 NSURLcredential 객체입니다.- (NSDictionary *)credentialsForProtectionSpace:(NSURLProtectionSpace *)space
지정된 안전 공간의 모든 인증서로 구성된 사전을 되돌려줍니다.Constants
NSString *const NSURLCredentialStorageRemoveSynchronizableCredentials
에 해당하는 값은 NSNumber 대상으로 부울 값을 표시하고 NSURLcredentialPersistenceSynchronizable 속성을 포함하는 증빙서류를 삭제해야 하는지를 지시한다.키가 누락되었거나 값이 @NO인 경우 자격 증명을 삭제하려고 하지 않습니다.Notifications
const NSNotificationName NSURLCredentialStorageChangedNotification
저장된 자격 증명이 변경되면 이 알림을 보냅니다.알림 대상은 NSURLcredentialStorage 인스턴스입니다.이 알림은 사용자 정보 사전을 포함하지 않습니다.Instance Methods
이 부분의 방법은 NSURLSessionTaskAdditions 분류 총에 정의되어 있으며 애플 문서에는 설명이 없고 아래는 모두 자신의 YY이다
- (void)getCredentialsForProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task completionHandler:(void (^)(NSDictionary *credentials))completionHandler
는 지정된 안전 공간을 얻고 작업의 모든 인증서를 지정하며 얻은 후에completionHandler를 호출한다.- (void)getDefaultCredentialForProtectionSpace:(NSURLProtectionSpace *)space task:(NSURLSessionTask *)task completionHandler:(void (^)(NSURLCredential *credential))completionHandler
는 지정된 안전 공간을 얻고 작업의 기본 인증서를 지정하며 얻은 후에completionHandler를 호출합니다.- (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace options:(NSDictionary *)options task:(NSURLSessionTask *)task
지정된 옵션에 따라 지정된 공간을 제거하고 지정한 작업의 지정 인증서- (void)setCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task
에 지정된 공간을 주고 지정된 작업에 지정한 인증서를 추가합니다.- (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task
에 지정된 공간을 주고 지정한 작업에 지정한 기본 인증서를 추가합니다.이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.