Example usage for org.springframework.vault.authentication AwsIamAuthenticationOptions getServerName

List of usage examples for org.springframework.vault.authentication AwsIamAuthenticationOptions getServerName

Introduction

In this page you can find the example usage for org.springframework.vault.authentication AwsIamAuthenticationOptions getServerName.

Prototype

@Nullable
@Deprecated
public String getServerName() 

Source Link

Usage

From source file:org.springframework.vault.authentication.AwsIamAuthentication.java

private static Map<String, String> createIamRequestHeaders(AwsIamAuthenticationOptions options) {

    Map<String, String> headers = new LinkedHashMap<>();

    headers.put(HttpHeaders.CONTENT_LENGTH, "" + REQUEST_BODY.length());
    headers.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);

    if (StringUtils.hasText(options.getServerName())) {
        headers.put("X-Vault-AWS-IAM-Server-ID", options.getServerName());
    }//from w ww. ja  v  a  2 s .c  o  m

    return headers;
}