use of com.blade.security.web.csrf.CsrfMiddleware in project blade by biezhi.
the class BladeTest method testUse.
@Test
public void testUse() {
Blade blade = Blade.of().use(new CsrfMiddleware());
List<WebHook> middleware = blade.middleware();
Assert.assertNotNull(middleware);
assertEquals(1, middleware.size());
}
use of com.blade.security.web.csrf.CsrfMiddleware in project tale by otale.
the class Application method main.
public static void main(String[] args) {
Blade blade = Blade.of();
TaleLoader.init(blade);
blade.use(new CsrfMiddleware()).start(Application.class, args);
}
use of com.blade.security.web.csrf.CsrfMiddleware in project tale by otale.
the class BladeTestRunner method withBeforeClasses.
@Override
protected Statement withBeforeClasses(final Statement statement) {
final Statement junitStatement = super.withBeforeClasses(statement);
return new Statement() {
@Override
public void evaluate() throws Throwable {
blade = Blade.me();
blade.use(new CsrfMiddleware()).start(mainCls).await();
junitStatement.evaluate();
}
};
}
Aggregations