-
# Using a separate port for oauth and API to make it easy to protect it
# differently than BOSH and Websocket HTTP interface.
port: 5281
ip: "127.0.0.1"
module: ejabberd_http
request_handlers:
"/oauth": ejabberd_oauth
"/api": mod_http_api
commands_admin_access:
- allow:
- user: "admin@domain.com"
commands:
- add_commands: [user, admin, open]
auth_expire: 31536000
oauth_access: all
But I get a "connection was reset" error. I do not have a firewall or anything blocking connection in use
Edit: Reading through the docs again, I wonder if this way is tied to an application which is listening for it? So the redirect? My intension was just to recieve a token so I could use it in a script
That error says that erlang couldn't fin the definition of the function authorize_password with three arguments in a module called oauth2. This usually means it couldn't find the file oauth.beam. That module is included in a dependency that ejabberd source code downloads automatically during compillation, or is already included in the binary installers.
The listener in port 5281 is
The listener in port 5281 is not configured to use any encryption, but later in curl you request an https page.
Oh, okay. I removed the
Oh, okay. I removed the reverse proxy for now. I am now calling http.
So i can now get a webpage when i put this in a browser
and when i try to log in, I get redirected to this url
But I get a "connection was reset" error. I do not have a firewall or anything blocking connection in use
Edit: Reading through the docs again, I wonder if this way is tied to an application which is listening for it? So the redirect? My intension was just to recieve a token so I could use it in a script
Edit2: Here is any relevant updated config parts:
> Edit: Reading through the
> Edit: Reading through the docs again, I wonder if this way is tied to an application which is listening for it? So the redirect?
Looking at the documentation, it seems so.
Configure access like this:
Then you can run this in a shell:
Then, if that's good, you can enable some module to run this command from somewhere else, like ejabberd_xmlrpc or mod_rest.
No dice :( I pretty much copy
No dice :(
I pretty much copy pasted the above config (and checked the docs) but got this error:
Would this be a bug to be reported?
That error says that erlang
That error says that erlang couldn't fin the definition of the function authorize_password with three arguments in a module called oauth2. This usually means it couldn't find the file oauth.beam. That module is included in a dependency that ejabberd source code downloads automatically during compillation, or is already included in the binary installers.