我試圖按照步驟here配置ejabberd OAuth但失敗。 ejabberd.yml看起來象下面這樣:如何使用Oauth支持配置ejabberd
-
port: 5280
module: ejabberd_http
request_handlers:
"/websocket": ejabberd_http_ws
"/log": mod_log_http
# OAuth support:
"/oauth": ejabberd_oauth
# ReST API:
"/api": mod_http_api
## "/pub/archive": mod_http_fileserver
web_admin: true
http_bind: true
## register: true
captcha: true
注意:我已經重新啓動ejabberd。我用
URL(這是我進入用戶,服務器和密碼頁):http://mytestsite.com:5280/oauth/authorization_token?response_type=token&client_id=Client1&redirect_uri=http://mytestsite.com&scope=user_get_roster+sasl_auth
我被重定向到https://mytestsite.com/?error=access_denied&state=&gws_rd=ssl
按照教程,一旦我在.yml文件中啓用了/ oauth和/ api,以下URL應該將我重定向到http://mytestsite.com/?access_token=RHIT8DoudzOctdzBhYL9bYvXz28xQ4Oj&token_type=bearer&expires_in=3600&scope=user_get_roster+sasl_auth&state=
你如何驗證用戶?您的後端是否配置正確? JID +登錄表單是否正確?您能否通過XMPP以相同的憑證進行身份驗證?你可以在管理員界面中正確認證嗎? –
你如何驗證用戶? - 內部認證。 您的後端是否配置正確? - 是的,我的後端已正確配置。 JID +登錄表單是否正確? - 是的,正確的。 您可以通過XMPP以相同的憑據進行正確的身份驗證嗎? - 是的,使用XMPP客戶端(Adium&Swift)進行測試並且正在運行。 你可以在管理網頁界面 正確認證 - 是的,可以。 – shkhssn
你是如何配置'oauth_access'參數的? –