Package br.com.caelum.brutauth.auth.annotations

Examples of br.com.caelum.brutauth.auth.annotations.CustomBrutauthRules


 
  @Override
  public boolean rulesOfTypeAllows(BrutauthClassOrMethod type) {
    boolean rulesAllows = true;
    if (type.containsAnnotation(CustomBrutauthRules.class)) {
      CustomBrutauthRules annotation = type.getAnnotation(CustomBrutauthRules.class);
      Class<? extends CustomBrutauthRule>[] rules = annotation.value();
      rulesAllows = rulesAllows(rules);
    }
    return rulesAllows;
   
  }
View Full Code Here


  }
 
  @Override
  public void intercept(InterceptorStack stack, ResourceMethod method,
      Object resourceInstance) throws InterceptionException {
    CustomBrutauthRules annotation = method.getMethod().getAnnotation(CustomBrutauthRules.class);
    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);
View Full Code Here

 
  @Override
  public boolean rulesOfTypeAllows(BrutauthClassOrMethod type) {
    boolean rulesAllows = true;
    if (type.containsAnnotation(CustomBrutauthRules.class)) {
      CustomBrutauthRules annotation = type.getAnnotation(CustomBrutauthRules.class);
      Class<? extends CustomBrutauthRule>[] rules = annotation.value();
      rulesAllows = rulesAllows(rules);
    }
    return rulesAllows;
   
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.brutauth.auth.annotations.CustomBrutauthRules

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.