ejabberd拒绝生成令牌 [英] ejabberd denies generating token

查看:96
本文介绍了ejabberd拒绝生成令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了所有问题和解答,可以找到,但是oauth仍然无法正常工作。
这是配置ejabberd.yml。

I have read all questions and answers what I can find, but oauth still not working. this is config ejabberd.yml.

 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: false
commands_admin_access: configure
commands:
  - add_commands: user
oauth_expire: 3600
oauth_access: all






http://192.168.217.128:5280/oauth/authorization_token?response_type=token&client_id=somclient&redirect_uri=当我打开此文件时,http://192.168.217.128:5280&scope=sasl_auth

url显示html格式,我在其中写jid,password和Token TTL(一小时)。单击接受URL重定向
http://192.168.217.128:5280/? error = access_denied& state =

when I open this url shows html form, where I write jid,password and Token TTL(one hours). after clicking accept url redirecting http://192.168.217.128:5280/?error=access_denied&state=

我在做什么错了?

我认为这很具体参数位置错误。如果这样,我不知道放在哪里。

I think this specific parameters place is wrong. If its like this, I do not understand where to put.

commands_admin_access: configure
commands:
  - add_commands: user
oauth_expire: 3600
oauth_access: all

对不起

推荐答案

这是顶层选项(例如api_permission),不应位于任何部分,应该从一行的开头开始。

This is top level option (like for example api_permission), it shouldn't be in any section, it should start at begin of a line.

您也应该将oauth_access设置为顶层,所以您应该:

You are supposed to make oauth_access top level as well, so you should have:

oauth_access: all

api_permission:
   "abc":
    ...

参考链接: https://github.com/processone/ejabberd/issues/1661

这篇关于ejabberd拒绝生成令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆