Repository: syncope
Updated Branches:
  refs/heads/2_0_X a1302562e -> 5545caf05
  refs/heads/master d5a5079cc -> 919b32e68


Adding an example to show how to obtain a JWT Token using curl and use it to 
make an invocation


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/12aa89d3
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/12aa89d3
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/12aa89d3

Branch: refs/heads/2_0_X
Commit: 12aa89d31385ed1534dc443d6bff5a6d1626324d
Parents: a130256
Author: Colm O hEigeartaigh <cohei...@apache.org>
Authored: Tue Jun 13 17:29:31 2017 +0100
Committer: Francesco Chicchiriccò <ilgro...@apache.org>
Committed: Wed Jun 14 10:18:00 2017 +0200

----------------------------------------------------------------------
 .../workingwithapachesyncope/restfulservices.adoc  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/12aa89d3/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
----------------------------------------------------------------------
diff --git 
a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
 
b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
index 340ebf2..32b6247 100644
--- 
a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
+++ 
b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
@@ -89,6 +89,23 @@ user.
 The same header with provided value must be included in all subsequent 
requests, in order for the requester to
 be checked for authorization.
 
+For example, using http://curl.haxx.se/[curl^]:
+
+....
+curl -I -u admin:password -X POST \
+   http://localhost:9080/syncope/rest/accessTokens/login
+....
+returns
+....
+HTTP/1.1 204 
+X-Syncope-Token: eyJ0e..
+....
+which can then be used to make a call to the REST API
+.....
+curl -I -H "X-Syncope-Token: eyJ0e.." \
+   http://localhost:9080/syncope/rest/users/self
+.....
+
 The token duration can be configured via the `jwt.lifetime.minutes` property - 
see
 <<configuration-parameters, below>> for details.
 

Reply via email to