/ auth和/ authenticate有什么区别?

时间:2019-05-09 12:02:52

标签: c# authorization servicestack

Swagger公开了以下端点:

swagger

有效载荷看上去与文档相同: https://docs.servicestack.net/authentication-and-authorization

从不提及/ authenticate端点。用于打字稿的DTO生成器也将它们显示为相同。

有区别吗?两者都有不同的用例吗?它仅仅是旧式端点吗?

是否有隐藏/ authenticate的方法?

1 个答案:

答案 0 :(得分:2)

它们都是aliases to the ServiceStack's AuthenticateService,为了向后兼容而保留。

/authenticate注册插件后,您可以删除以前的AuthFeature路由:

Plugins.Add(new AuthFeature(...));

GetPlugin<AuthFeature>().ServiceRoutes[typeof(AuthenticateService)] = new[] {
    "/auth", "/auth/{provider}"
};
相关问题