diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-03-16 12:54:42 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-03-16 12:54:42 +0000 |
commit | cc6e5951cc5937eac014cfdb62592e88dbe32fac (patch) | |
tree | 300bae2f241956394e5ccd7424e68cee66638e4d | |
parent | 4e8e7e5cd99dd807c6d0d44805d3951ef7a8cbce (diff) | |
parent | 13015323dfa3adc795a6344668a906c48d7a5e12 (diff) |
Merge "Fix to use renewal keystone token when re-authenticated"2015.1.0b3
-rw-r--r-- | hadoop-swiftfs/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hadoop-swiftfs/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java b/hadoop-swiftfs/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java index 75df4ec..27c5ff6 100644 --- a/hadoop-swiftfs/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java +++ b/hadoop-swiftfs/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java | |||
@@ -1804,10 +1804,10 @@ public final class SwiftRestClient { | |||
1804 | * @param accessToken access token | 1804 | * @param accessToken access token |
1805 | * @throws SwiftInternalStateException if the client is not yet authenticated | 1805 | * @throws SwiftInternalStateException if the client is not yet authenticated |
1806 | */ | 1806 | */ |
1807 | private void setAuthToken(HttpMethodBase method, AccessToken accessToken) | 1807 | private void setAuthToken(HttpMethod method, AccessToken accessToken) |
1808 | throws SwiftInternalStateException { | 1808 | throws SwiftInternalStateException { |
1809 | checkNotNull(accessToken,"Not authenticated"); | 1809 | checkNotNull(accessToken,"Not authenticated"); |
1810 | method.addRequestHeader(HEADER_AUTH_KEY, accessToken.getId()); | 1810 | method.setRequestHeader(HEADER_AUTH_KEY, accessToken.getId()); |
1811 | } | 1811 | } |
1812 | 1812 | ||
1813 | /** | 1813 | /** |
@@ -1859,7 +1859,7 @@ public final class SwiftRestClient { | |||
1859 | LOG.debug("Reauthenticating"); | 1859 | LOG.debug("Reauthenticating"); |
1860 | } | 1860 | } |
1861 | //re-auth, this may recurse into the same dir | 1861 | //re-auth, this may recurse into the same dir |
1862 | authenticate(); | 1862 | setAuthToken(method, authenticate()); |
1863 | if (LOG.isDebugEnabled()) { | 1863 | if (LOG.isDebugEnabled()) { |
1864 | LOG.debug("Retrying original request"); | 1864 | LOG.debug("Retrying original request"); |
1865 | } | 1865 | } |