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. API-Since: 2.0
    • Constructor Detail

      • NSURLCredentialStorage

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NSURLCredentialStorage allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull 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

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • 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

        @NotNull
        public static @NotNull 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

        @NotNull
        public @NotNull 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

        @Nullable
        public @Nullable NSDictionary<java.lang.String,​? extends NSURLCredential> credentialsForProtectionSpace​(@NotNull
                                                                                                                      @NotNull 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

        @Nullable
        public @Nullable NSURLCredential defaultCredentialForProtectionSpace​(@NotNull
                                                                             @NotNull 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​(@NotNull
                                                       @NotNull NSURLCredential credential,
                                                       @NotNull
                                                       @NotNull 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​(@NotNull
                                                              @NotNull NSURLCredential credential,
                                                              @NotNull
                                                              @NotNull NSURLProtectionSpace space,
                                                              @Nullable
                                                              @Nullable 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. API-Since: 7.0
        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.
      • removeCredentialForProtectionSpaceOptionsTask

        public void removeCredentialForProtectionSpaceOptionsTask​(@NotNull
                                                                  @NotNull NSURLCredential credential,
                                                                  @NotNull
                                                                  @NotNull NSURLProtectionSpace protectionSpace,
                                                                  @Nullable
                                                                  @Nullable NSDictionary<java.lang.String,​?> options,
                                                                  @NotNull
                                                                  @NotNull NSURLSessionTask task)
        API-Since: 8.0
      • setCredentialForProtectionSpace

        public void setCredentialForProtectionSpace​(@NotNull
                                                    @NotNull NSURLCredential credential,
                                                    @NotNull
                                                    @NotNull 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​(@NotNull
                                                           @NotNull NSURLCredential credential,
                                                           @NotNull
                                                           @NotNull 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​(@NotNull
                                                               @NotNull NSURLCredential credential,
                                                               @NotNull
                                                               @NotNull NSURLProtectionSpace protectionSpace,
                                                               @NotNull
                                                               @NotNull NSURLSessionTask task)
        API-Since: 8.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.