Add README section about client store configuration.

This commit is contained in:
Chteufleur 2017-03-20 22:22:50 +01:00
parent 850a283083
commit 3e8cec5bd9
2 changed files with 11 additions and 0 deletions

View File

@ -9,6 +9,7 @@ Can be run as a XMPP client or XMPP component.
* [go-xmpp](https://git.kingpenguin.tk/chteufleur/go-xmpp) for the XMPP part. * [go-xmpp](https://git.kingpenguin.tk/chteufleur/go-xmpp) for the XMPP part.
* [cfg](https://github.com/jimlawless/cfg) for the configuration file. * [cfg](https://github.com/jimlawless/cfg) for the configuration file.
* [oauth2.v3](https://github.com/go-oauth2/oauth2) for OAuth2 support.
### Build and run ### Build and run
@ -52,6 +53,9 @@ If ``http_bind_address_ipv4`` is set to ``0.0.0.0``, it will bind all address on
The lang messages file must be placed into the same directory than the configuration file. 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](https://git.kingpenguin.tk/chteufleur/HTTPAuthentificationOverXMPP/src/master/messages.lang) An example of this file can be found in [the repos](https://git.kingpenguin.tk/chteufleur/HTTPAuthentificationOverXMPP/src/master/messages.lang)
### OAuth configuration
OAuth configuration is made by a file that can be found in [the repos](https://git.kingpenguin.tk/chteufleur/HTTPAuthentificationOverXMPP/src/oauth/clientStore.json) and must be place following [XDG specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) (example ``/etc/xdg/http-auth/clientStore.json``).
### Usage ### Usage
To ask authorization, just send an HTTP request to the path ``/auth`` with parameters: To ask authorization, just send an HTTP request to the path ``/auth`` with parameters:
* __jid__ : JID of the user (user@host/resource or user@host) * __jid__ : JID of the user (user@host/resource or user@host)

7
clientStore.json Normal file
View File

@ -0,0 +1,7 @@
[
{
"ID": "key",
"Secret": "secret",
"Domain": "http://localhost:9094"
}
]