You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2017/06/14 08:28:56 UTC
[1/3] syncope git commit: Adding an example to show how to obtain a
JWT Token using curl and use it to make an invocation
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 <co...@apache.org>
Authored: Tue Jun 13 17:29:31 2017 +0100
Committer: Francesco Chicchiriccò <il...@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.
[3/3] syncope git commit: Formatting curl JWT as AsciiDoctor's sample
Posted by il...@apache.org.
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ò <il...@apache.org>
Authored: Wed Jun 14 10:28:25 2017 +0200
Committer: Francesco Chicchiriccò <il...@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.
[2/3] syncope git commit: Formatting curl JWT as AsciiDoctor's sample
Posted by il...@apache.org.
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/5545caf0
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/5545caf0
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/5545caf0
Branch: refs/heads/2_0_X
Commit: 5545caf056b22b8520df508dfef89d9a42f6172b
Parents: 12aa89d
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Jun 14 10:28:25 2017 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Jun 14 10:28:25 2017 +0200
----------------------------------------------------------------------
.../workingwithapachesyncope/restfulservices.adoc | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/5545caf0/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 32b6247..b16fc71 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.