401 Unauthorized error with correct credentials.
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- java
- 领域
- api, authentication
调研方向
首先,将 getMyMerchantDetails() 中的属性与可正常工作的 getMerchantDetails() 示例进行比较,重点检查商户 ID、密钥 ID、密钥、身份验证类型和运行环境。重新发送针对 https://apitest.cybersource.com/pts/v2/payments 的请求,并验证修正后的配置返回预期的 201 响应,而不是 401 Unauthorized。
由索引模型根据 Issue 内容生成。
描述
I followed the documentation and set up my API credentials as below:
public static Properties getMyMerchantDetails() {
Properties props = new Properties();
// HTTP_Signature = http_signature and JWT = jwt
props.setProperty("authenticationType", "http_signature");
props.setProperty("merchantID", "my_web_au");
props.setProperty("runEnvironment", "apitest.cybersource.com");
props.setProperty("merchantKeyId", "my_merchant_id");
props.setProperty("merchantsecretKey", "my_sercret_key");
props.setProperty("useMetaKey", "false");
props.setProperty("enableClientCert", "false");
return props;
}
it gives me 401 unauthorized error:
Response{protocol=http/1.1, code=401, message=Unauthorized, url=https://apitest.cybersource.com/pts/v2/payments}
public static Properties getMerchantDetails() {
Properties props = new Properties();
// HTTP_Signature = http_signature and JWT = jwt
props.setProperty("authenticationType", "http_signature");
props.setProperty("merchantID", "testrest");
props.setProperty("runEnvironment", "apitest.cybersource.com");
props.setProperty("requestJsonPath", "src/main/resources/request.json");
props.setProperty("useMetaKey", "false");
// HTTP Parameters
props.setProperty("merchantKeyId", "ggggggggggg");
props.setProperty("merchantsecretKey", "gggggggggg");
props.setProperty("enableClientCert", "false");
return props;
}
The above gives which is me 201 proper response.
I am sure my credentials are correctly created. Is there anything else I should add or modify to get past authorization?
- 主要语言
- Java
- 星标
- 35
- 派生
- 84
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CyberSource/cybersource-rest-samples-java 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 55/100
-
难度 4/5 3-5 天 新手友好度 20/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 25/100
CyberSource/cybersource-rest-samples-java#62 · 1 条评论 ·
查看 CyberSource/cybersource-rest-samples-java 的全部 Issue
相似的 Issue
-
area/plugin good first issue
难度 2/5 1-3 小时 新手友好度 88/100
kestra-io/plugin-kestra#200 ·
维护者通常 1 天内回复
-
bug untriaged
难度 1/5 1 小时以内 新手友好度 92/100
opensearch-project/search-relevance#618 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
apache/rocketmq-dashboard#6716 ·
维护者通常 3 天内回复
-
DefaultRedisList.get(int) does not reject an index equal to the list size可能已有人在做 @ryujungkyun 今天认领。 未关闭status: waiting-for-triage
难度 1/5 1 小时以内 新手友好度 68/100
spring-projects/spring-data-redis#3471 ·
维护者通常 5 天内回复
-
in: build type: dependency-upgrade
难度 1/5 1 小时以内 新手友好度 62/100
spring-projects/spring-ldap#1791 ·
维护者通常 1 天内回复