邮递员自定义身份验证

Postman custom authentication

Postman 上有没有办法在执行请求 A 之前预执行请求 B?

CONTEXT:我创建了一个 Symfony 应用程序来管理一组网络服务。 大多数路由只有在用户完全通过身份验证后才能调用(对于熟悉框架)

因此,我必须先打电话:

POST /登录

在能够调用之前

获取/some_secured_route

(return 一个 JSON 响应)

当我在 Postman 构建器.

中连续手动调用路由时,这工作正常

但是,我正在尝试在 Postman 运行ner 中创建一个测试集合以 运行。在测试安全路由之前,如何调用 /login 请求?

对相关 post 的任何帮助或 link 将不胜感激。 祝大家有个美好的一天。

我认为您不能在 Postman 中使用自定义身份验证模式。我想你需要的是 Jetpacks for Postman.

Chain requests together: Environment and global variables can be set inside the JS test script. You can extract data from one request and use it inside another request. This allows you to chain multiple requests together.

现在你可以在此处使用 postman 拦截器作为描述器:https://community.getpostman.com/t/interceptor-integration-for-postman-native-apps/5290