Class LARight

  • All Implemented Interfaces:
    NSObject
    Direct Known Subclasses:
    LAPersistedRight

    public class LARight
    extends NSObject
    Groups a set of requirements that need to be satisfied in order to grant access to certain resource or operation API-Since: 16.0
    • Constructor Detail

      • LARight

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static LARight alloc()
      • allocWithZone

        public static LARight allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • authorizeWithLocalizedReasonCompletion

        public void authorizeWithLocalizedReasonCompletion​(@NotNull
                                                           @NotNull java.lang.String localizedReason,
                                                           @NotNull
                                                           @NotNull LARight.Block_authorizeWithLocalizedReasonCompletion handler)
        Tries to authorize the right.
        Parameters:
        localizedReason - Localized explanation for the authorization. Appears in the UI presented to the user.
        handler - Completion handler called after the authorization finishes. Returns an error when the authorization fails.
      • 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)
      • checkCanAuthorizeWithCompletion

        public void checkCanAuthorizeWithCompletion​(@NotNull
                                                    @NotNull LARight.Block_checkCanAuthorizeWithCompletion handler)
        Checks whether the client can eventually be granted the right.
        Parameters:
        handler - Completion handler. Returns @c nil if the right can be authorized or an error otherwise.
      • classFallbacksForKeyedArchiver

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

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • deauthorizeWithCompletion

        public void deauthorizeWithCompletion​(@NotNull
                                              @NotNull LARight.Block_deauthorizeWithCompletion handler)
        Invalidates a previously authorized right.
        Parameters:
        handler - Completion handler called after the right is deauthorized.
      • 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()
      • init

        public LARight init()
        Constructs a right using default authorization requirements For authorizing a right with default requirements a user will be asked to authenticate using biometry or the device passcode.
        Overrides:
        init in class NSObject
        Returns:
      • initWithRequirement

        public LARight initWithRequirement​(@NotNull
                                           @NotNull LAAuthenticationRequirement requirement)
        Constructs a right that will be granted only when the given @c LAAuthenticationRequirement is statisfied.
        Parameters:
        requirement - Requirement that needs to be satisfied to authorize the right
        Returns:
      • 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)
      • new_objc

        public static LARight new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setTag

        public void setTag​(long value)
        An application-supplied integer that can be used to identify right intances. The default value is @c 0.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • state

        public long state()
        Provides the current authorization state of the @c LARight instance
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • tag

        public long tag()
        An application-supplied integer that can be used to identify right intances. The default value is @c 0.
      • version_static

        public static long version_static()
      • authorizeWithLocalizedReasonInPresentationContextCompletion

        public void authorizeWithLocalizedReasonInPresentationContextCompletion​(@NotNull
                                                                                @NotNull java.lang.String localizedReason,
                                                                                @NotNull
                                                                                @NotNull UIWindow presentationContext,
                                                                                @NotNull
                                                                                @NotNull LARight.Block_authorizeWithLocalizedReasonInPresentationContextCompletion handler)
        Tries to authorize the right.
        Parameters:
        localizedReason - Localized explanation for the authorization. Appears in the UI presented to the user.
        presentationContext - Container where the authorization UI will be presented.
        handler - Completion handler called after the authorization finishses. Returns an error when the authorization fails.
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.