Package org.jboss.errai.bus.server.security.auth.rules

Examples of org.jboss.errai.bus.server.security.auth.rules.RolesRequiredRule


    final ErraiServiceConfigurator config = context.getConfig();

    if (config.hasProperty(requireAuthenticationForAll) && "true".equals(config.getProperty(requireAuthenticationForAll))) {
      log.info("authentication for all requests required, adding rule ... ");
      context.getBus().addRule("AuthorizationService", new RolesRequiredRule(new HashSet<Object>(), context.getBus()));
    }
  }
View Full Code Here


        if (commandPoints.isEmpty()) {
          // Subscribe the service to the bus.
          context.getBus().subscribe(svcName, (MessageCallback) svc);
        }

        RolesRequiredRule rule = null;
        if (clazz.isAnnotationPresent(RequireRoles.class)) {
          rule = new RolesRequiredRule(clazz.getAnnotation(RequireRoles.class).value(), context.getBus());
        }
        else if (clazz.isAnnotationPresent(RequireAuthentication.class)) {
          rule = new RolesRequiredRule(new HashSet<Object>(), context.getBus());
        }
        if (rule != null) {
          context.getBus().addRule(svcName, rule);
        }
      }
View Full Code Here

    final ErraiServiceConfigurator config = context.getConfig();

    if (config.hasProperty(requireAuthenticationForAll) && "true".equals(config.getProperty(requireAuthenticationForAll))) {
      log.debug("authentication for all requests required, adding rule ... ");
      context.getBus().addRule("AuthorizationService", new RolesRequiredRule(new HashSet<Object>(), context.getBus()));
    }
  }
View Full Code Here

    if (svc == null) {
      svc = createServiceInjector(loadClass, context, config, false);
    }

    RolesRequiredRule rule = null;
    if (loadClass.isAnnotationPresent(RequireRoles.class)) {
      rule = new RolesRequiredRule(loadClass.getAnnotation(RequireRoles.class).value(), context.getBus());
    }
    else if (loadClass.isAnnotationPresent(RequireAuthentication.class)) {
      rule = new RolesRequiredRule(new HashSet<Object>(), context.getBus());
    }

    if (!commandPoints.isEmpty()) {
      if (local) {
        context.getBus().subscribeLocal(svcName, new CommandBindingsCallback(commandPoints, svc, context.getBus()));
View Full Code Here

            }
          }
        }).getInstance(loadClass);
      }

      RolesRequiredRule rule = null;
      if (loadClass.isAnnotationPresent(RequireRoles.class)) {
        rule = new RolesRequiredRule(loadClass.getAnnotation(RequireRoles.class).value(), context.getBus());
      }
      else if (loadClass.isAnnotationPresent(RequireAuthentication.class)) {
        rule = new RolesRequiredRule(new HashSet<Object>(), context.getBus());
      }

      if (!commandPoints.isEmpty()) {
        if (local) {
          context.getBus().subscribeLocal(svcName, new CommandBindingsCallback(commandPoints, svc, context.getBus()));
View Full Code Here

                    }
                  }, method, context.getBus()));
        }
      }

      RolesRequiredRule rule = null;
      if (loadClass.isAnnotationPresent(RequireRoles.class)) {
        rule = new RolesRequiredRule(loadClass.getAnnotation(RequireRoles.class).value(), context.getBus());
      }
      else if (loadClass.isAnnotationPresent(RequireAuthentication.class)) {
        rule = new RolesRequiredRule(new HashSet<Object>(), context.getBus());
      }


      if (!epts.isEmpty()) {
        final String rpcEndpointName = loadClass.getSimpleName() + ":RPC";
View Full Code Here

          else {
            context.getBus().subscribe(svcName, (MessageCallback) svc);
          }
        }

        RolesRequiredRule rule = null;
        if (clazz.isAnnotationPresent(RequireRoles.class)) {
          rule = new RolesRequiredRule(clazz.getAnnotation(RequireRoles.class).value(), context.getBus());
        }
        else if (clazz.isAnnotationPresent(RequireAuthentication.class)) {
          rule = new RolesRequiredRule(new HashSet<Object>(), context.getBus());
        }
        if (rule != null) {
          context.getBus().addRule(svcName, rule);
        }
      }
View Full Code Here

    final ErraiServiceConfigurator config = context.getConfig();

    if (config.hasProperty(requireAuthenticationForAll) && "true".equals(config.getProperty(requireAuthenticationForAll))) {
      log.info("authentication for all requests required, adding rule ... ");
      context.getBus().addRule("AuthorizationService", new RolesRequiredRule(new HashSet<Object>(), context.getBus()));
    }
  }
View Full Code Here

        }).getInstance(loadClass);
      }

      final Object targetService = svc;

      RolesRequiredRule rule = null;
      if (loadClass.isAnnotationPresent(RequireRoles.class)) {
        rule = new RolesRequiredRule(loadClass.getAnnotation(RequireRoles.class).value(), context.getBus());
      }
      else if (loadClass.isAnnotationPresent(RequireAuthentication.class)) {
        rule = new RolesRequiredRule(new HashSet<Object>(), context.getBus());
      }

      if (!commandPoints.isEmpty()) {
        if (local) {
          context.getBus().subscribeLocal(svcName, new CommandBindingsCallback(commandPoints, svc, context.getBus()));
View Full Code Here

            }
          }
        }).getInstance(loadClass);
      }

      RolesRequiredRule rule = null;
      if (loadClass.isAnnotationPresent(RequireRoles.class)) {
        rule = new RolesRequiredRule(loadClass.getAnnotation(RequireRoles.class).value(), context.getBus());
      }
      else if (loadClass.isAnnotationPresent(RequireAuthentication.class)) {
        rule = new RolesRequiredRule(new HashSet<Object>(), context.getBus());
      }

      if (!commandPoints.isEmpty()) {
        if (local) {
          context.getBus().subscribeLocal(svcName, new CommandBindingsCallback(commandPoints, svc, context.getBus()));
View Full Code Here

TOP

Related Classes of org.jboss.errai.bus.server.security.auth.rules.RolesRequiredRule

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.