Examples of Authorizer


Examples of org.restlet.security.Authorizer

                getContext(), ChallengeScheme.HTTP_BASIC, "saas");
        authenticator.setNext(new HelloWorldRestlet());
        root.attach("/test1", authenticator);

        // Attach test 2
        Authorizer authorizer = Authorizer.ALWAYS;
        authorizer.setNext(new HelloWorldRestlet());
        root.attach("/test2", authorizer);

        // Attach test 3
        authorizer = Authorizer.NEVER;
        authorizer.setNext(new HelloWorldRestlet());
        root.attach("/test3", authorizer);

        // Attach test 4
        RoleAuthorizer roleAuthorizer = new RoleAuthorizer();
        roleAuthorizer.getAuthorizedRoles().add(getRole("admin"));
View Full Code Here

Examples of ratpack.pac4j.Authorizer

  @Override
  public Handler decorate(Injector injector, Handler handler) {
    final String callbackPath = getCallbackPath(injector);
    final Client<C, U> client = getClient(injector);
    final Authorizer authorizer = getAuthorizer(injector);
    final Pac4jClientsHandler clientsHandler = new Pac4jClientsHandler(callbackPath, client);
    final Handler callbackHandler = new Pac4jCallbackHandlerBuilder().build();
    final Pac4jAuthenticationHandler authenticationHandler = new Pac4jAuthenticationHandler(client.getName(), authorizer);
    return Handlers.chain(clientsHandler, Handlers.path(callbackPath, callbackHandler), authenticationHandler, handler);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.