Class 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.
    • Constructor Detail

      • NSURLCredentialStorage

        protected NSURLCredentialStorage​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • 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()
      • 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.
      • 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 removed
        options - 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.
      • 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.
      • 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.