Formatting curl JWT as AsciiDoctor's sample
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/919b32e6 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/919b32e6 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/919b32e6 Branch: refs/heads/master Commit: 919b32e6840ae330db944cb1990baccae365a245 Parents: d5a5079 Author: Francesco Chicchiriccò <ilgro...@apache.org> Authored: Wed Jun 14 10:28:25 2017 +0200 Committer: Francesco Chicchiriccò <ilgro...@apache.org> Committed: Wed Jun 14 10:28:40 2017 +0200 ---------------------------------------------------------------------- .../workingwithapachesyncope/restfulservices.adoc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/919b32e6/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 d602a61..544b143 100644 --- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc +++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc @@ -89,11 +89,10 @@ 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^]: - +.Obtaining JWT with http://curl.haxx.se/[curl^] +==== .... -curl -I -u admin:password -X POST \ - http://localhost:9080/syncope/rest/accessTokens/login +curl -I -u admin:password -X POST http://localhost:9080/syncope/rest/accessTokens/login .... returns .... @@ -102,9 +101,9 @@ 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 +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.