private Map<String, String> resolve(Map<String,
            Future<String>> pendingTokens) throws GuacamoleException {

        // Populate map with tokens containing the values of their
        // corresponding secrets
        Map<String, String> tokens = new HashMap<>(pendingTokens.size());
        for (Map.Entry<String, Future<String>> entry : pendingTokens.entrySet()) {

            // Complete secret retrieval operation, blocking if necessary
            String secretValue;
            try {
                secretValue = entry.getValue().get();
            }
            catch (InterruptedException | ExecutionException e) {
                throw new GuacamoleServerException("Retrieval of secret value "
                        + "failed.", e);
            }

            // If a value is defined for the secret in question, store that
            // value under the mapped token
            String tokenName = entry.getKey();
            if (secretValue != null) {
                tokens.put(tokenName, secretValue);
                logger.debug("Token \"{}\" populated with value from "
                        + "secret.", tokenName);
            }
            else
                logger.debug("Token \"{}\" not populated. Mapped "
                        + "secret has no value.", tokenName);

        }

        return tokens;

    }
Waits for all pending secret retrieval operations to complete,
transforming each Future within the given Map into its contained String
value.

@param pendingTokens
    A Map of token name to Future, where each Future represents the
    pending retrieval operation which will ultimately be completed with
    the value of all secrets mapped to that token.

@return
    A Map of token name to the corresponding String value retrieved for
    that token from the vault.

@throws GuacamoleException
    If the value for any applicable secret cannot be retrieved from the
    vault due to an error.
extensions/guacamole-vault/modules/guacamole-vault-base/src/main/java/org/apache/guacamole/vault/user/VaultUserContext.java