Class UnrestrictedMethodAuthorizer

  • java.lang.Object
    • org.apache.geode.cache.query.security.UnrestrictedMethodAuthorizer
    • Constructor Detail

      • UnrestrictedMethodAuthorizer

        public UnrestrictedMethodAuthorizer​(Cache cache)
        Creates a UnrestrictedMethodAuthorizer object and initializes it so it can be safely used in a multi-threaded environment.

        Applications can use this constructor as part of the initialization for custom authorizers (see Declarable.initialize(Cache, Properties)), when using a declarative approach.

        Parameters:
        cache - the Cache instance that owns this authorizer, required in order to configure the default RestrictedMethodAuthorizer.
      • UnrestrictedMethodAuthorizer

        public UnrestrictedMethodAuthorizer​(RestrictedMethodAuthorizer restrictedMethodAuthorizer)
        Creates a UnrestrictedMethodAuthorizer object and initializes it so it can be safely used in a multi-threaded environment.

        Parameters:
        restrictedMethodAuthorizer - the default RestrictedMethodAuthorizer to use.
    • Method Detail

      • authorize

        public boolean authorize​(Method method,
                                 Object target)
        Executes the authorization logic to determine whether the method is allowed to be executed on the target object instance. If the target object is an instance of Region, this methods also ensures that the user has the DATA:READ permission granted for the target Region.

        Specified by:
        authorize in interface MethodInvocationAuthorizer
        Parameters:
        method - the Method that should be authorized.
        target - the Object on which the Method will be executed.
        Returns:
        true if the method can be executed on on the target instance, false otherwise.
        See Also:
        MethodInvocationAuthorizer