Examples of security()


Examples of com.jetdrone.vertx.yoke.Yoke.security()

        final Yoke yoke = new Yoke(this);
        yoke.secretSecurity("keyboard cat");

        yoke.engine("shtml", new StringPlaceholderEngine("views"));

        final Mac secret = yoke.security().getMac("HmacSHA256");

        // all environments
        yoke.use(new CookieParser(secret));
        yoke.use(new Session(secret));
        yoke.use(new BodyParser());
View Full Code Here

Examples of com.jetdrone.vertx.yoke.Yoke.security()

                final Yoke app = new Yoke(SessionStoreExample.this);
                app.secretSecurity("keyboard cat");

                app.store(new MongoDBSessionStore(vertx.eventBus(), "vertx.mongopersistor", "sessions"));

                final Mac hmac = app.security().getMac("HmacSHA256");

                app.use(new BodyParser());
                app.use(new CookieParser(hmac));
                app.use(new Session(hmac));
View Full Code Here

Examples of com.jetdrone.vertx.yoke.Yoke.security()

    @Test
    public void testJWT() {
        final Yoke yoke = new Yoke(this);
        yoke.secretSecurity("keyboard cat");

        JWT jwt = new JWT(yoke.security());
        testComplete();
    }

    @Test
    public void testJWT2() {
View Full Code Here

Examples of com.jetdrone.vertx.yoke.Yoke.security()

    @Test
    public void testJWT2() {
        Yoke yoke = new Yoke(this);
        yoke.secretSecurity("keyboard cat");

        JWT jwt = new JWT(yoke.security());

        long now = System.currentTimeMillis();

        JsonObject json = new JsonObject()
                .putString("name", "Paulo Lopes")
View Full Code Here

Examples of com.jetdrone.vertx.yoke.Yoke.security()

    public void start() {

        final Yoke app = new Yoke(this);
        app.secretSecurity("keyboard cat");

        final Mac hmac = app.security().getMac("HmacSHA256");

        app.use(new BodyParser());
        app.use(new CookieParser(hmac));
        app.use(new Session(hmac));
View Full Code Here

Examples of com.jetdrone.vertx.yoke.Yoke.security()

    @Test
    public void testSession() {
        final Yoke yoke = new Yoke(this);
        yoke.secretSecurity("keyboard cat");

        final Mac hmac = yoke.security().getMac("HmacSHA256");
        yoke.use(new CookieParser(hmac));
        yoke.use(new com.jetdrone.vertx.yoke.middleware.Session(hmac));
        yoke.use(new Router() {{
            get("/", new Handler<YokeRequest>() {
                @Override
View Full Code Here

Examples of org.infinispan.client.hotrod.configuration.ConfigurationBuilder.security()

   }

   @Test
   public void testAuthentication() {
      ConfigurationBuilder clientBuilder = initServerAndClient();
      clientBuilder.security().authentication().callbackHandler(new TestCallbackHandler("user", "realm", "password".toCharArray()));
      remoteCacheManager = new RemoteCacheManager(clientBuilder.build());
      RemoteCache<String, String> defaultRemote = remoteCacheManager.getCache();
      defaultRemote.put("a", "a");
      assertEquals("a", defaultRemote.get("a"));
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.configuration.ConfigurationBuilder.security()

   }

   @Test(expectedExceptions=TransportException.class)
   public void testAuthenticationFail() {
      ConfigurationBuilder clientBuilder = initServerAndClient();
      clientBuilder.security().authentication().callbackHandler(new TestCallbackHandler("user", "realm", "foobar".toCharArray()));
      remoteCacheManager = new RemoteCacheManager(clientBuilder.build());
      remoteCacheManager.getCache();
   }

   @Override
View Full Code Here

Examples of org.infinispan.configuration.cache.Configuration.security()

            CacheWrapper existingCacheWrapper = caches.get(cacheName);
            if (existingCacheWrapper != null) {
               return null; //signal that the cache was created by someone else
            }
            c = getConfiguration(cacheName);
            if (c.security().authorization().enabled()) {
               // Don't even attempt to wire anything if we don't have LIFECYCLE privileges
               authzHelper.checkPermission(c.security().authorization(), AuthorizationPermission.LIFECYCLE);
            }
            createdCacheWrapper = new CacheWrapper();
            if (caches.put(cacheName, createdCacheWrapper) != null) {
View Full Code Here

Examples of org.infinispan.configuration.cache.Configuration.security()

               return null; //signal that the cache was created by someone else
            }
            c = getConfiguration(cacheName);
            if (c.security().authorization().enabled()) {
               // Don't even attempt to wire anything if we don't have LIFECYCLE privileges
               authzHelper.checkPermission(c.security().authorization(), AuthorizationPermission.LIFECYCLE);
            }
            createdCacheWrapper = new CacheWrapper();
            if (caches.put(cacheName, createdCacheWrapper) != null) {
               throw new IllegalStateException("attempt to initialize the cache twice");
            }
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.