From 26a5dbddf3a9bfde481a6fcd2aae16c7ecba665f Mon Sep 17 00:00:00 2001 From: José Bollo Date: Fri, 13 Dec 2019 14:55:22 +0100 Subject: Improve documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug-AGL: SPEC-2968 Bug-AGL: SPEC-3032 Change-Id: I796f324e92df709a26e4b0bc64bed1e10b67f757 Signed-off-by: José Bollo --- README.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 68 insertions(+), 12 deletions(-) (limited to 'README.md') 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: + +OAuth 2.0 Authorization Server Metadata: + +OAuth 2.0 Dynamic Client Registration Protocol: + +OpenID Connect Discovery 1.0: + +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 +``` -- cgit 1.2.3-korg