Package apple.foundation
Class NSURLCredentialStorage
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.foundation.NSURLCredentialStorage
-
- All Implemented Interfaces:
NSObject
public class NSURLCredentialStorage extends NSObject
NSURLCredentialStorage 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceNSURLCredentialStorage.Block_getCredentialsForProtectionSpaceTaskCompletionHandlerstatic interfaceNSURLCredentialStorage.Block_getDefaultCredentialForProtectionSpaceTaskCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSURLCredentialStorage(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()NSDictionary<? extends NSURLProtectionSpace,? extends NSDictionary<java.lang.String,? extends NSURLCredential>>allCredentials()Get a dictionary mapping NSURLProtectionSpaces to dictionaries which map usernames to NSURLCredentialsstatic NSURLCredentialStoragealloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()NSDictionary<java.lang.String,? extends NSURLCredential>credentialsForProtectionSpace(NSURLProtectionSpace space)credentialsForProtectionSpace: Get a dictionary mapping usernames to credentials for the specified protection space.static java.lang.StringdebugDescription_static()NSURLCredentialdefaultCredentialForProtectionSpace(NSURLProtectionSpace space)defaultCredentialForProtectionSpace: Get the default credential for the specified protection space.static java.lang.Stringdescription_static()voidgetCredentialsForProtectionSpaceTaskCompletionHandler(NSURLProtectionSpace protectionSpace, NSURLSessionTask task, NSURLCredentialStorage.Block_getCredentialsForProtectionSpaceTaskCompletionHandler completionHandler)voidgetDefaultCredentialForProtectionSpaceTaskCompletionHandler(NSURLProtectionSpace space, NSURLSessionTask task, NSURLCredentialStorage.Block_getDefaultCredentialForProtectionSpaceTaskCompletionHandler completionHandler)static longhash_static()NSURLCredentialStorageinit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()voidremoveCredentialForProtectionSpace(NSURLCredential credential, NSURLProtectionSpace space)removeCredential:forProtectionSpace: Remove the credential from the set for the specified protection space.voidremoveCredentialForProtectionSpaceOptions(NSURLCredential credential, NSURLProtectionSpace space, NSDictionary<java.lang.String,?> options)removeCredential:forProtectionSpace:options Remove the credential from the set for the specified protection space based on options.voidremoveCredentialForProtectionSpaceOptionsTask(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSDictionary<java.lang.String,?> options, NSURLSessionTask task)static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetCredentialForProtectionSpace(NSURLCredential credential, NSURLProtectionSpace space)setCredential:forProtectionSpace: Add a new credential to the set for the specified protection space or replace an existing one.voidsetCredentialForProtectionSpaceTask(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task)voidsetDefaultCredentialForProtectionSpace(NSURLCredential credential, NSURLProtectionSpace space)setDefaultCredential:forProtectionSpace: Set the default credential for the specified protection space.voidsetDefaultCredentialForProtectionSpaceTask(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task)static voidsetVersion_static(long aVersion)static NSURLCredentialStoragesharedCredentialStorage()[@property] sharedCredentialStorage Get the shared singleton authentication storagestatic org.moe.natj.objc.Classsuperclass_static()static longversion_static()-
Methods inherited from class apple.NSObject
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, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSURLCredentialStorage alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
sharedCredentialStorage
public static NSURLCredentialStorage sharedCredentialStorage()
[@property] sharedCredentialStorage Get the shared singleton authentication storage- Returns:
- the shared authentication storage
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
allCredentials
public NSDictionary<? extends NSURLProtectionSpace,? extends NSDictionary<java.lang.String,? extends NSURLCredential>> allCredentials()
Get a dictionary mapping NSURLProtectionSpaces to dictionaries which map usernames to NSURLCredentials- Returns:
- an NSDictionary where the keys are NSURLProtectionSpaces and the values are dictionaries, in which the keys are usernames and the values are NSURLCredentials
-
credentialsForProtectionSpace
public NSDictionary<java.lang.String,? extends NSURLCredential> credentialsForProtectionSpace(NSURLProtectionSpace space)
credentialsForProtectionSpace: Get a dictionary mapping usernames to credentials for the specified protection space.- Parameters:
space- An NSURLProtectionSpace indicating the protection space for which to get credentials- Returns:
- A dictionary where the keys are usernames and the values are the corresponding NSURLCredentials.
-
defaultCredentialForProtectionSpace
public NSURLCredential defaultCredentialForProtectionSpace(NSURLProtectionSpace space)
defaultCredentialForProtectionSpace: Get the default credential for the specified protection space.- Parameters:
space- The protection space for which to get the default credential.
-
getCredentialsForProtectionSpaceTaskCompletionHandler
public void getCredentialsForProtectionSpaceTaskCompletionHandler(NSURLProtectionSpace protectionSpace, NSURLSessionTask task, NSURLCredentialStorage.Block_getCredentialsForProtectionSpaceTaskCompletionHandler completionHandler)
-
getDefaultCredentialForProtectionSpaceTaskCompletionHandler
public void getDefaultCredentialForProtectionSpaceTaskCompletionHandler(NSURLProtectionSpace space, NSURLSessionTask task, NSURLCredentialStorage.Block_getDefaultCredentialForProtectionSpaceTaskCompletionHandler completionHandler)
-
init
public NSURLCredentialStorage init()
-
removeCredentialForProtectionSpace
public void removeCredentialForProtectionSpace(NSURLCredential credential, NSURLProtectionSpace space)
removeCredential:forProtectionSpace: 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.- Parameters:
credential- The credential to remove.space- The protection space for which a credential should be removed
-
removeCredentialForProtectionSpaceOptions
public void removeCredentialForProtectionSpaceOptions(NSURLCredential credential, NSURLProtectionSpace space, NSDictionary<java.lang.String,?> options)
removeCredential:forProtectionSpace: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.- Parameters:
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.
-
removeCredentialForProtectionSpaceOptionsTask
public void removeCredentialForProtectionSpaceOptionsTask(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSDictionary<java.lang.String,?> options, NSURLSessionTask task)
-
setCredentialForProtectionSpace
public void setCredentialForProtectionSpace(NSURLCredential credential, NSURLProtectionSpace space)
setCredential:forProtectionSpace: 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.- Parameters:
credential- The credential to set.space- The protection space for which to add it.
-
setCredentialForProtectionSpaceTask
public void setCredentialForProtectionSpaceTask(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task)
-
setDefaultCredentialForProtectionSpace
public void setDefaultCredentialForProtectionSpace(NSURLCredential credential, NSURLProtectionSpace space)
setDefaultCredential:forProtectionSpace: 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.- Parameters:
credential- The credential to set as default.space- The protection space for which the credential should be set as default.
-
setDefaultCredentialForProtectionSpaceTask
public void setDefaultCredentialForProtectionSpaceTask(NSURLCredential credential, NSURLProtectionSpace protectionSpace, NSURLSessionTask task)
-
-