我们使用Play 2 authenticate plugin作为REST API,我想简单地返回200或403进行登录尝试。播放2 Java身份验证插件 - HTTP状态码响应而不是重定向
插件的代码如下所示:
public static Result loginAndRedirect(final Context context,
final AuthUser loginUser) {
storeUser(context.session(), loginUser);
return Controller.redirect(getJumpUrl(context));
}
有什么办法避免重定向不分叉插件项目?
你看过解析器了吗? https://github.com/joscha/play-authenticate/blob/master/samples/java/Getting%20Started.md#configure-the-resolver –