|chteufleur ea4f78e23b Modification because of un-golang fix names in lib go-xmpp.||1 year ago|
|http||1 year ago|
|packaging||1 year ago|
|scripts||1 year ago|
|xmpp||1 year ago|
|.gitignore||2 years ago|
|LICENSE||2 years ago|
|README.md||1 year ago|
|httpAuth.conf||1 year ago|
|main.go||1 year ago|
|messages.lang||1 year ago|
Provide an HTTP authentication over XMPP. Implementation of XEP-0070.
Can be run as a XMPP client or XMPP component.
You must first install go environment on your system. Then, go into your $GOPATH directory and go get the source code.
go get git.kingpenguin.tk/chteufleur/HTTPAuthentificationOverXMPP.git
First, you need to go into directory
Then, you can run the project directly by using command
go run main.go.
Or, in order to build the project you can run the command
go build main.go.
It will generate a binary that you can run as any binary file.
Configure the gateway by editing the
httpAuth.conf file in order to give all XMPP and HTTP server informations. This configuration file has to be placed following the XDG specification (example
An example of the config file can be found in the repos.
Bold config are mandatory.
http_bind_address_ipv4 is set to
0.0.0.0, it will bind all address on IPv4 AND IPv6.
The lang messages file must be placed into the same directory than the configuration file. An example of this file can be found in the repos
To ask authorization, just send an HTTP request to the path
/auth with parameters:
Bold parameters are mandatory.
GET /auth?jid=user%40host%2fresource;domain=example.org;method=POST;transaction_id=WhatEverYouWant;timeout=120 HTTP/1.1
This will send a request to the given JID, then return HTTP code depending on what appended.
If the provided JID contain a resource, it will try to send an
If the answer to this
iq is a
it will automatically send a
message stanza. Unfortunately, if a
message stanza is used,
their is probably no way to get the error if the JID does not exist or is unreachable.
A demo version can be found at auth.xmpp.kingpenguin.tk for test purpose only.