summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-12-13 14:55:22 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-12-13 14:58:00 +0100
commit26a5dbddf3a9bfde481a6fcd2aae16c7ecba665f (patch)
tree2e7d18554ea4caddbb00234bd7b2c806ce3b4093 /README.md
parentf1bcc5cd93e050b9147d56c53c8e7fbe36298c55 (diff)
Bug-AGL: SPEC-2968 Bug-AGL: SPEC-3032 Change-Id: I796f324e92df709a26e4b0bc64bed1e10b67f757 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'README.md')
-rw-r--r--README.md80
1 files changed, 68 insertions, 12 deletions
diff --git a/README.md b/README.md
index 448aed1..6012177 100644
--- a/README.md
+++ b/README.md
@@ -8,9 +8,8 @@ It currently only implments the client credential flow, checking
the client identity using the Smack label. A tiny launcher,
cynagoauth-launch, is provided to negociate the token and run
the final client, setting CYNAGOAUTH_TOKEN environment
-variable and substi
-
-
+variable and substitute the patterns for the token of the
+arguments of the launched program.
LICENSE
-------
@@ -24,18 +23,18 @@ DEPENDENCIES
It depends of:
- - json-c
- - libmicrohttpd
- - openssl
- - libcurl
-
+- json-c
+- libmicrohttpd
+- openssl
+- libcurl
+- cynagora
COMPILING
---------
To compile and install it:
-```
+```sh
mkdir build
cd build
cmake ..
@@ -45,8 +44,65 @@ make
RFCs
----
-OAuth 2.0 Authorization Server Metadata: https://tools.ietf.org/html/rfc8414
+OAuth 2.0 Authorization Framework: <https://tools.ietf.org/html/rfc6749>
+
+OAuth 2.0 Authorization Server Metadata: <https://tools.ietf.org/html/rfc8414>
+
+OAuth 2.0 Dynamic Client Registration Protocol: <https://tools.ietf.org/html/rfc7591>
+
+OpenID Connect Discovery 1.0: <https://openid.net/specs/openid-connect-discovery-1_0.html>
+
+cynagoauth-server
+-----------------
+
+```text
+> cynagoauth-server -h
+
+usage: cynagoauth-server [options...] [interfaces...]
+
+Run a basic OAuth server, currently only implementing client credential
+flow based on Smack labels and Cynagora backend.
+
+The interfaces specify ip adresses and port to listen. It must be of
+the form [HOST][:SERVICE]. Default host: *, default port: 7777.
+Examples:
-OAuth 2.0 Dynamic Client Registration Protocol: https://tools.ietf.org/html/rfc7591
+ localhost:5555 listen on loopback on port 5555
+ *:1234 listen any interface on port 1234
+ localhost listen on default port of localhost
-OpenID Connect Discovery 1.0: https://openid.net/specs/openid-connect-discovery-1_0.html
+Default interface if none is given: *:7777
+
+Options:
+
+ -h, --help this help
+ -s, --secure serves https
+ -u, --unsecure serves http
+```
+
+cynagoauth-launcher
+-------------------
+
+```text
+usage: cynagoauth-launch [options...] program [args...]
+
+Ask an OAuth2 server for an access token and launches the given program
+with this retrieved token. The URL of the token end point to be queried
+can be set by option (see below) or environment variable CYNAGOAUTH_URL.
+The default value is http://localhost:7777/tok
+
+When launched the program has the following environment variables defined:
+
+ - the access token CYNAGOAUTH_TOKEN
+
+The arguments of the program to launch are scanned and patterns for the token
+are substituted by the effective value of the token. The default pattern is @t
+
+Options:
+
+ -h, --help this help
+ -n, --name NAME name of the environement variable to set
+ -r, --replace PATTERN redefine the pattern to be replaced
+ -t, --token TOKEN the token to use, token end point is not queried
+ -u, --url URL URL of the token end point
+```