【问题标题】:How to add spring security parameters in Postman?如何在 Postman 中添加 spring 安全参数?
【发布时间】:2019-07-19 07:21:55
【问题描述】:

我在我的项目中添加了 Spring Security。当我从浏览器请求时它工作正常,它只是询问我的用户名和密码并提供对 API 的访问权限。但现在我从邮递员那里试过了。我尝试在标题中传递用户名和密码字段,但它不允许我访问 API。

我在 Postman 中不断收到未经授权的 401。

【问题讨论】:

标签: java spring api spring-boot spring-security


【解决方案1】:

只需选择“授权”选项卡,然后选择授权方法。这里很清楚https://learning.getpostman.com/docs/postman/sending_api_requests/authorization/

根据您的情况选择“基本”授权

【讨论】:

    猜你喜欢
    • 2016-05-29
    • 2013-04-25
    • 2013-11-16
    • 2015-08-10
    • 2017-07-19
    • 2019-01-06
    • 1970-01-01
    • 2016-04-20
    • 1970-01-01
    相关资源
    最近更新 更多