Package br.com.caelum.brutauth.auth.handlers

Examples of br.com.caelum.brutauth.auth.handlers.RuleHandler


  private boolean rulesAllows(Class<? extends SimpleBrutauthRule>[] rules,
      long permissionData) {
    for (Class<? extends SimpleBrutauthRule> permission : rules) {
      SimpleBrutauthRule rule = container.instanceFor(permission);
      RuleHandler handler = handlers.getHandler(rule);
      if(!rule.isAllowed(permissionData)){
        handler.handle();
        return false;
      }
    }
    return true;
 
View Full Code Here


  private boolean rulesAllows(Class<? extends CustomBrutauthRule>[] rules) {
    for (Class<? extends CustomBrutauthRule> rule : rules) {
      CustomBrutauthRule brutauthRule = container.instanceFor(rule);
      boolean allowed = invoker.invoke(brutauthRule,  arguments.getValuedArguments());
      RuleHandler handler = handlers.getHandler(brutauthRule);
      if(!allowed){
        handler.handle();
        return false;
      }
    }
    return true;
  }
View Full Code Here

    if (method.containsAnnotation(AccessLevel.class)) {
      permissionData = method.getMethod().getAnnotation(AccessLevel.class).value();
    }
    for (Class<? extends SimpleBrutauthRule> permission : permissions) {
      SimpleBrutauthRule rule = container.instanceFor(permission);
      RuleHandler handler = handlers.getHandler(rule);
      if(!rule.isAllowed(permissionData)){
        handler.handle();
        return;
      }
    }
    stack.next(method, resourceInstance);
  }
View Full Code Here

    Class<? extends CustomBrutauthRule>[] values = annotation.value();
   
    for (Class<? extends CustomBrutauthRule> value : values) {
      CustomBrutauthRule brutauthRule = container.instanceFor(value);
      boolean allowed = invoker.invoke(brutauthRule, methodInfo.getParameters());
      RuleHandler handler = handlers.getHandler(brutauthRule);
      if(!allowed){
        handler.handle();
        return;
      }
     
    }
    stack.next(method, resourceInstance);
View Full Code Here

  private boolean rulesAllows(Class<? extends CustomBrutauthRule>[] rules) {
    for (Class<? extends CustomBrutauthRule> rule : rules) {
      CustomBrutauthRule brutauthRule = container.instanceFor(rule);
      boolean allowed = invoker.invoke(brutauthRule, methodInfo.getParametersValues());
      RuleHandler handler = handlers.getHandler(brutauthRule);
      if(!allowed){
        handler.handle();
        return false;
      }
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.brutauth.auth.handlers.RuleHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.