[英]Java Peer Not Authenticated
I'm trying to get OAuth through SoundCloud set up, but I'm having tremendous trouble. 我试图通过SoundCloud设置OAuth,但我遇到了很大的麻烦。 My newest issue is this:
我最新的问题是:
I have the user login through a popup window which is connected to SoundCloud. 我让用户通过连接到SoundCloud的弹出窗口登录。 It gives me a back a code once the user logs in. This is all working;
一旦用户登录,它就会给我一个代码。这一切都正常; however, the next step is failing for me.
然而,下一步是失败的。 Once I have the code, I run this snippet of Java code:
一旦我有了代码,我就运行这段Java代码:
URI redir = new URI("http://localhost:9000/auth/soundcloudcapturetoken");
ApiWrapper api = new ApiWrapper(SC_CLIENT_ID, SC_CLIENT_SECRET, redir, null, Env.SANDBOX);
Token authToken = api.authorizationCode(code);
Java fails on the api.authorizationCode(code) line with this error: Java在api.authorizationCode(code)行上失败并出现此错误:
SSLPeerUnverifiedException occured : peer not authenticated
I snooped around online, and stumbled upon this post: http://davidjb.com/blog/2012/02/java-http-request-fails-with-javax-net-ssl-sslpeerunverifiedexception-peer-not-authenticated 我在网上闲逛,偶然发现了这篇文章: http : //davidjb.com/blog/2012/02/java-http-request-fails-with-javax-net-ssl-sslpeerunverifiedexception-peer-not-authenticated
It suggested that I add the two mentioned certs to my java cacerts file(s). 它建议我将两个提到的证书添加到我的java cacerts文件中。 I added the two certificates to both my jdk and jre, but my app still fails with the same error.
我将两个证书添加到我的jdk和jre中,但我的应用程序仍然失败并出现相同的错误。 Is there something I am missing here?
这里有什么我想念的吗?
As a side note, I am currently using this api to access SoundCloud: https://github.com/soundcloud/java-api-wrapper 作为旁注,我目前正在使用此API访问SoundCloud: https : //github.com/soundcloud/java-api-wrapper
SoundCloud dev here. SoundCloud dev在这里。
Are you trying to use the sandbox (ie connecting to https://api.sandbox-soundcloud.com ) ? 您是否尝试使用沙箱(即连接到https://api.sandbox-soundcloud.com )? If so, I was trying to reproduce your issue and just realised that our certificate for that host expired, we are deploying a new certificate as we speak, really sorry about that.
如果是这样,我试图重现您的问题并且刚刚意识到我们的主机证书已过期,我们正在部署新证书,我们对此表示非常抱歉。
Also, you can find help from SoundCloud engineers in our mailing list: http://bit.ly/yqcubH 此外,您可以在我们的邮件列表中找到SoundCloud工程师的帮助: http : //bit.ly/yqcubH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.