public class NSURLCredentialStorage extends NSObject
NSURLCredentialStorage implements a singleton object (shared instance) which manages the shared credentials cache. Note: Whereas in Mac OS X any application can access any credential with a persistence of NSURLCredentialPersistencePermanent provided the user gives permission, in iPhone OS an application can access only its own credentials.
| Modifier and Type | Class and Description |
|---|---|
static interface |
NSURLCredentialStorage.Block_getCredentialsForProtectionSpaceTaskCompletionHandler |
static interface |
NSURLCredentialStorage.Block_getDefaultCredentialForProtectionSpaceTaskCompletionHandler |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NSURLCredentialStorage(org.moe.natj.general.Pointer peer) |
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeyprotected NSURLCredentialStorage(org.moe.natj.general.Pointer peer)
public static boolean accessInstanceVariablesDirectly()
public static NSURLCredentialStorage alloc()
public static NSURLCredentialStorage allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static NSURLCredentialStorage new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static NSURLCredentialStorage sharedCredentialStorage()
Get the shared singleton authentication storage
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public NSDictionary<? extends NSURLProtectionSpace,? extends NSDictionary<java.lang.String,? extends NSURLCredential>> allCredentials()
public NSDictionary<java.lang.String,? extends NSURLCredential> credentialsForProtectionSpace(NSURLProtectionSpace space)
Get a dictionary mapping usernames to credentials for the specified protection space.
space - An NSURLProtectionSpace indicating the protection space for which to get credentialspublic NSURLCredential defaultCredentialForProtectionSpace(NSURLProtectionSpace space)
Get the default credential for the specified protection space.
space - The protection space for which to get the default credential.public void getCredentialsForProtectionSpaceTaskCompletionHandler(NSURLProtectionSpace protectionSpace, NSURLSessionTask task, NSURLCredentialStorage.Block_getCredentialsForProtectionSpaceTaskCompletionHandler completionHandler)
public void getDefaultCredentialForProtectionSpaceTaskCompletionHandler(NSURLProtectionSpace space, NSURLSessionTask task, NSURLCredentialStorage.Block_getDefaultCredentialForProtectionSpaceTaskCompletionHandler completionHandler)
public NSURLCredentialStorage init()
public void removeCredentialForProtectionSpace(NSURLCredential credential, NSURLProtectionSpace space)
Remove the credential from the set for the specified protection space.
The credential is removed from both persistent and temporary storage. A credential that has a persistence policy of NSURLCredentialPersistenceSynchronizable will fail. See removeCredential:forProtectionSpace:options.
credential - The credential to remove.space - The protection space for which a credential should be removedpublic void removeCredentialForProtectionSpaceOptions(NSURLCredential credential, NSURLProtectionSpace space, NSDictionary<java.lang.String,?> options)
Remove the credential from the set for the specified protection space based on options.
The credential is removed from both persistent and temporary storage.
credential - The credential to remove.space - The protection space for which a credential should be removedoptions - A dictionary containing options to consider when removing the credential. This should
be used when trying to delete a credential that has the NSURLCredentialPersistenceSynchronizable policy.
Please note that when NSURLCredential objects that have a NSURLCredentialPersistenceSynchronizable policy
are removed, the credential will be removed on all devices that contain this credential.public void removeCredentialForProtectionSpaceOptionsTask(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSDictionary<java.lang.String,?> options, NSURLSessionTask task)
public void setCredentialForProtectionSpace(NSURLCredential credential, NSURLProtectionSpace space)
Add a new credential to the set for the specified protection space or replace an existing one.
Multiple credentials may be set for a given protection space, but each must have a distinct user. If a credential with the same user is already set for the protection space, the new one will replace it.
credential - The credential to set.space - The protection space for which to add it.public void setCredentialForProtectionSpaceTask(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task)
public void setDefaultCredentialForProtectionSpace(NSURLCredential credential, NSURLProtectionSpace space)
Set the default credential for the specified protection space.
If the credential is not yet in the set for the protection space, it will be added to it.
credential - The credential to set as default.space - The protection space for which the credential should be set as default.public void setDefaultCredentialForProtectionSpaceTask(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task)