Package com.jetdrone.vertx.yoke.middleware

Examples of com.jetdrone.vertx.yoke.middleware.AuthHandler


    }

    @Test
    public void testEmptyPassword() {
        final Yoke yoke = new Yoke(this);
        yoke.use(new com.jetdrone.vertx.yoke.middleware.BasicAuth(new AuthHandler() {
            @Override
            public void handle(String username, String password, Handler<JsonObject> result) {
                boolean success = username.equals("Aladdin") && password == null;
                if (success) {
                    result.handle(new JsonObject().putString("username", username));
View Full Code Here


        app.use(new BodyParser());
        app.use(new CookieParser(hmac));
        app.use(new Session(hmac));

        final FormAuth formAuth = new FormAuth(new AuthHandler() {
            @Override
            public void handle(String username, String password, Handler<JsonObject> result) {
                if ("foo".equals(username) && "bar".equals(password)) {
                    result.handle(new JsonObject().putString("username", "foo"));
                } else {
View Full Code Here

TOP

Related Classes of com.jetdrone.vertx.yoke.middleware.AuthHandler

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.