使用Android通过OAuth1调用Open Bank Project

问题描述 投票:0回答:1

我尝试在我的Android应用中使用开放银行项目(OBP)。我想列出银行,用户可以选择其中的一个或多个来拥有自己的名单。

为此,我通过OBP克隆了示例应用程序:https://github.com/OpenBankProject/Hello-OBP-OAuth1.0a-Android

这里,我的步骤:

  1. 在OBP页上注册并注册密钥应用程序:https://apisandbox.openbankproject.com/consumer-registration

enter image description hereenter image description here

  1. 克隆示例应用程序https://github.com/OpenBankProject/Hello-OBP-OAuth1.0a-Android
  2. 在Android Studio中打开。
  3. 打开OBPRestClient.java,并通过“消费者密钥”和“消费者秘密”更改OBP_AUTH_KEY和OBP_SECRET_KEY。将BASE_URL更改为“ https://apisandbox.openbankproject.com”。
  4. 打开OAuthActivity.java并删除(1 == 1)抛出新的RuntimeException(“需要安装!请参见OAuthActivity.java”);
  5. 以res / values / strings打开,并将customAppProtocol值更改为“ intent”。
  6. 打开AndroidManifest并为enter image description here
  7. 如果启动该应用程序,则会启动浏览器,并且必须登录到OBP-API。我这样做并收到OBP的消息。enter image description here
  8. 如果我单击“此处”,则该应用程序无法启动。我认为我的重定向网址是错误的:(

此问题的解决方案是什么?

java android oauth deep-linking open-banking
1个回答
0
投票

您需要在name =“ customAppProtocol”>app_name¨中设置与您的应用相同的app_name,并使用redirectURL = app_name:/在开放银行项目中创建新的注册对我有用。

© www.soinside.com 2019 - 2024. All rights reserved.