ratpack

Spring WebFlux -01-Reactor 简介

巧了我就是萌 提交于 2020-02-26 04:37:29
Reactor是第四代Reactive库,基于Reactive Streams规范在JVM上构建非阻塞应用程序。Reactor侧重于服务器端响应式编程,是一个基于Java 8实现的响应式流规范(Reactive Streams specification)响应式库。 作为Reactive Engine/SPI,Reactor Core和IO模块都为重点使用场景提供了响应流构造,最终与Spring、RxJava、Akka Streams和Ratpack等框架结合使用,作为Reactive API,Reactor框架模块提供了丰富的消费功能,如组合和发布订阅事件。 本节对Reactor的介绍以基本的概念和简单使用为主,更多Reactor高级特性可参考Reactor官网: http://projectreactor.io/ 。 来源: oschina 链接: https://my.oschina.net/u/3777515/blog/3163492

Is there a way to work around RatpackPac4j#requireAuth not setting the WWW-Authenticate header?

回眸只為那壹抹淺笑 提交于 2020-01-06 07:15:22
问题 When testing Pac4j (2.x) authentication in the context of a Ratpack (1.5.x) app, I find that when I use this handler: all RatpackPac4j.requireAuth(HeaderClient) ...Unauthorised requests get rejected correctly with a 401 status, and RFC-7235 states that a WWW-Authenticate header should be added, and it is not. I raised an issue on the RatpackPac4j tracker here, but it was closed as (I infer) "won't fix" since Pac4j v3 implements this properly. And RatpackPac4j has not been upgraded to work

How do I mock a Session in Ratpack with RequestFixture?

旧城冷巷雨未停 提交于 2019-12-24 12:09:50
问题 What I'm trying to do is test an authentication handler, but my problem boils down to having no Session instance in the registry. An example test: package whatever import groovy.transform.CompileStatic import ratpack.groovy.handling.GroovyChainAction import ratpack.groovy.test.handling.GroovyRequestFixture import ratpack.http.Status import ratpack.session.Session import spock.lang.Specification class SessionChainTest extends Specification { GroovyChainAction sessionChain = new