Fixed AuthMethodResponse for Vault 0.6.1 compatibility

This commit is contained in:
2016-09-01 20:26:14 +02:00
parent 4c68e74a38
commit 847cce7bfb
5 changed files with 41 additions and 26 deletions

View File

@@ -159,7 +159,7 @@ public class HTTPVaultConnector implements VaultConnector {
String response = requestGet(PATH_AUTH, new HashMap<>());
/* Parse response */
AuthMethodsResponse amr = jsonMapper.readValue(response, AuthMethodsResponse.class);
return amr.getSupportedMethods().stream().map(AuthMethod::getType).collect(Collectors.toList());
return amr.getSupportedMethods().values().stream().map(AuthMethod::getType).collect(Collectors.toList());
} catch (IOException e) {
throw new InvalidResponseException("Unable to parse response", e);
} catch (URISyntaxException ignored) {