【发布时间】:2019-11-08 11:06:56
【问题描述】:
我在 8080 端口上运行 Tomcat。我有一个 apache2 代理,它有 SSL 证书,它将所有加密流量从 443 传递到 8080 端口。一切正常,除了 facebook 身份验证。
如果 apache2 关闭,并且 SSL 在 tomcat 中打开 - 它正在工作。我相信流量加密的问题,也许 facebook 从我的非 SSL tomcat 服务器检索请求?
我的 apache 配置:
服务器名称 thing-tracker.ga SSL引擎开启 SSLCertificateFile /opt/cert/cert.pem SSLCertificateKeyFile /opt/cert/privkey.pem SSLCertificateChainFile /opt/cert/chain.pem
DefaultType text/html
ProxyRequests off
ProxyPreserveHost On
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /(.*) ws://localhost:8080/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /(.*) http://localhost:8080/$1 [P,L]
# ProxyPass / http://localhost:8080/
# ProxyPassReverse / https://localhost/
错误:
由于异常,从请求 [/login/oauth2/code/facebook] 转发到错误页面
[读取 OAuth 2.0 时发生错误错误:JSON 解析错误:
无法从 START_OBJECT 令牌中反序列化 java.lang.String 的实例;
嵌套异常是
com.fasterxml.jackson.databind.exc.MismatchedInputException:无法从 START_OBJECT 令牌中反序列化 java.lang.String 的实例
在 [来源:(sun.net.www.protocol.http.HttpURLConnection$HttpInputStream);行:1,列:10](通过引用链:java.util.LinkedHashMap["error"]);
【问题讨论】:
标签: facebook spring-boot tomcat oauth-2.0 apache2