Interface MethodSecurityService

All Known Implementing Classes:
MethodSecurityServiceImpl

public interface MethodSecurityService
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    evaluateMethodAccess(Method method, Class<?> resourceClass, boolean denyIfUndefined)
    Checks if the current principal is authorized to access the given Method.
  • Method Details

    • evaluateMethodAccess

      void evaluateMethodAccess(Method method, Class<?> resourceClass, boolean denyIfUndefined) throws UnauthorizedException
      Checks if the current principal is authorized to access the given Method. The check is made based on the Secured annotation on the given method. If there is no annotation present on the method, the annotation of the declaring class is used.
      Parameters:
      denyIfUndefined - if true, an exception is thrown if no annotation is found on the method/class
      Throws:
      UnauthorizedException