syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/2] syncope git commit: Actual takes the refreshed JWT
Date Tue, 06 Jun 2017 13:24:03 GMT
Actual takes the refreshed JWT


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

Branch: refs/heads/master
Commit: b715166c150dcca4cec6d6ccda07351e14ba2278
Parents: bd695da
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Tue Jun 6 15:23:46 2017 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Tue Jun 6 15:23:54 2017 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/syncope/client/lib/SyncopeClient.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/b715166c/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClient.java
----------------------------------------------------------------------
diff --git a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClient.java b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClient.java
index a566419..f722cf8 100644
--- a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClient.java
+++ b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClient.java
@@ -127,7 +127,8 @@ public class SyncopeClient {
      * Attempts to extend the lifespan of the JWT currently in use.
      */
     public void refresh() {
-        getService(AccessTokenService.class).refresh();
+        String jwt = getService(AccessTokenService.class).refresh().getHeaderString(RESTHeaders.TOKEN);
+        restClientFactory.getHeaders().put(RESTHeaders.TOKEN, Collections.singletonList(jwt));
     }
 
     /**


Mime
View raw message