From 3e8cec5bd9a0f5d72068dfb5b137aac0ac193a28 Mon Sep 17 00:00:00 2001 From: Chteufleur Date: Mon, 20 Mar 2017 22:22:50 +0100 Subject: [PATCH] Add README section about client store configuration. --- README.md | 4 ++++ clientStore.json | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 clientStore.json diff --git a/README.md b/README.md index 053b023..8cbf53b 100644 --- a/README.md +++ b/README.md @@ -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. * [cfg](https://github.com/jimlawless/cfg) for the configuration file. + * [oauth2.v3](https://github.com/go-oauth2/oauth2) for OAuth2 support. ### 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. 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 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) diff --git a/clientStore.json b/clientStore.json new file mode 100644 index 0000000..6bc55a6 --- /dev/null +++ b/clientStore.json @@ -0,0 +1,7 @@ +[ + { + "ID": "key", + "Secret": "secret", + "Domain": "http://localhost:9094" + } +]