Class MethodSecurityServiceImpl

java.lang.Object
ch.tocco.nice2.security.impl.MethodSecurityServiceImpl
All Implemented Interfaces:
MethodSecurityService

@Component public class MethodSecurityServiceImpl extends Object implements MethodSecurityService
  • Constructor Details

    • MethodSecurityServiceImpl

      public MethodSecurityServiceImpl()
  • Method Details

    • evaluateMethodAccess

      public void evaluateMethodAccess(Method method, Class<?> resourceClass, boolean denyIfUndefined) throws UnauthorizedException
      Description copied from interface: MethodSecurityService
      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.
      Specified by:
      evaluateMethodAccess in interface MethodSecurityService
      Parameters:
      denyIfUndefined - if true, an exception is thrown if no annotation is found on the method/class
      Throws:
      UnauthorizedException