Search in sources :

Example 1 with ShiroAuthOptions

use of io.vertx.ext.auth.shiro.ShiroAuthOptions in project vertx-auth by vert-x3.

the class AuthOptionsTest method testSomething.

@Test
public void testSomething() {
    ShiroAuthOptions options = new ShiroAuthOptions(new JsonObject().put("provider", "shiro").put("type", "PROPERTIES").put("config", new JsonObject().put("foo", "bar")));
    assertEquals(ShiroAuthRealmType.PROPERTIES, options.getType());
    assertEquals(new JsonObject().put("foo", "bar"), options.getConfig());
}
Also used : ShiroAuthOptions(io.vertx.ext.auth.shiro.ShiroAuthOptions) JsonObject(io.vertx.core.json.JsonObject) Test(org.junit.Test)

Example 2 with ShiroAuthOptions

use of io.vertx.ext.auth.shiro.ShiroAuthOptions in project vertx-examples by vert-x3.

the class RunShell method start.

@Override
public void start(Promise<Void> startPromise) throws Exception {
    ShellService service = ShellService.create(vertx, new ShellServiceOptions().setSSHOptions(new SSHTermOptions().setHost("localhost").setPort(3000).setKeyPairOptions(new JksOptions().setPath("keystore.jks").setPassword("wibble")).setAuthOptions(new ShiroAuthOptions().setConfig(new JsonObject().put("properties_path", "auth.properties")))));
    service.start(startPromise);
}
Also used : ShellService(io.vertx.ext.shell.ShellService) ShellServiceOptions(io.vertx.ext.shell.ShellServiceOptions) ShiroAuthOptions(io.vertx.ext.auth.shiro.ShiroAuthOptions) JksOptions(io.vertx.core.net.JksOptions) JsonObject(io.vertx.core.json.JsonObject) SSHTermOptions(io.vertx.ext.shell.term.SSHTermOptions)

Example 3 with ShiroAuthOptions

use of io.vertx.ext.auth.shiro.ShiroAuthOptions in project vertx-examples by vert-x3.

the class RunShell method start.

@Override
public void start(Future<Void> startFuture) throws Exception {
    ShellService service = ShellService.create(vertx, new ShellServiceOptions().setHttpOptions(new HttpTermOptions().setHost("localhost").setPort(8080).setAuthOptions(new ShiroAuthOptions().setConfig(new JsonObject().put("properties_path", "auth.properties")))));
    service.start(ar -> {
        if (ar.succeeded()) {
            startFuture.succeeded();
        } else {
            startFuture.fail(ar.cause());
        }
    });
}
Also used : ShellService(io.vertx.ext.shell.ShellService) HttpTermOptions(io.vertx.ext.shell.term.HttpTermOptions) ShellServiceOptions(io.vertx.ext.shell.ShellServiceOptions) ShiroAuthOptions(io.vertx.ext.auth.shiro.ShiroAuthOptions) JsonObject(io.vertx.core.json.JsonObject)

Example 4 with ShiroAuthOptions

use of io.vertx.ext.auth.shiro.ShiroAuthOptions in project vertx-examples by vert-x3.

the class RunShell method start.

@Override
public void start(Future<Void> startFuture) throws Exception {
    ShellService service = ShellService.create(vertx, new ShellServiceOptions().setSSHOptions(new SSHTermOptions().setHost("localhost").setPort(3000).setKeyPairOptions(new JksOptions().setPath("keystore.jks").setPassword("wibble")).setAuthOptions(new ShiroAuthOptions().setConfig(new JsonObject().put("properties_path", "auth.properties")))));
    service.start(ar -> {
        if (ar.succeeded()) {
            startFuture.succeeded();
        } else {
            startFuture.fail(ar.cause());
        }
    });
}
Also used : ShellService(io.vertx.ext.shell.ShellService) ShellServiceOptions(io.vertx.ext.shell.ShellServiceOptions) ShiroAuthOptions(io.vertx.ext.auth.shiro.ShiroAuthOptions) JksOptions(io.vertx.core.net.JksOptions) JsonObject(io.vertx.core.json.JsonObject) SSHTermOptions(io.vertx.ext.shell.term.SSHTermOptions)

Example 5 with ShiroAuthOptions

use of io.vertx.ext.auth.shiro.ShiroAuthOptions in project vertx-examples by vert-x3.

the class RunShell method start.

@Override
public void start(Promise<Void> startPromise) throws Exception {
    ShellService service = ShellService.create(vertx, new ShellServiceOptions().setHttpOptions(new HttpTermOptions().setHost("localhost").setPort(8080).setAuthOptions(new ShiroAuthOptions().setConfig(new JsonObject().put("properties_path", "auth.properties")))));
    service.start(startPromise);
}
Also used : ShellService(io.vertx.ext.shell.ShellService) HttpTermOptions(io.vertx.ext.shell.term.HttpTermOptions) ShellServiceOptions(io.vertx.ext.shell.ShellServiceOptions) ShiroAuthOptions(io.vertx.ext.auth.shiro.ShiroAuthOptions) JsonObject(io.vertx.core.json.JsonObject)

Aggregations

JsonObject (io.vertx.core.json.JsonObject)5 ShiroAuthOptions (io.vertx.ext.auth.shiro.ShiroAuthOptions)5 ShellService (io.vertx.ext.shell.ShellService)4 ShellServiceOptions (io.vertx.ext.shell.ShellServiceOptions)4 JksOptions (io.vertx.core.net.JksOptions)2 HttpTermOptions (io.vertx.ext.shell.term.HttpTermOptions)2 SSHTermOptions (io.vertx.ext.shell.term.SSHTermOptions)2 Test (org.junit.Test)1