@Beta public class ApiKeyAuth extends Object implements Authentication
Constructor and Description |
---|
ApiKeyAuth(String location,
String paramName)
Create an instance of this authentication using an API key
|
Modifier and Type | Method and Description |
---|---|
void |
applyToParams(org.springframework.util.MultiValueMap<String,String> queryParams,
org.springframework.http.HttpHeaders headerParams)
Apply authentication settings to header and / or query parameters.
|
String |
getApiKey()
Get the API Key
|
String |
getApiKeyPrefix()
Get the API key prefix
|
String |
getLocation()
Get the location of the API Key
|
String |
getParamName()
Get the parameter name of the API Key
|
void |
setApiKey(String apiKey)
Set the API key
|
void |
setApiKeyPrefix(String apiKeyPrefix)
Set the API key prefix
|
@Nonnull public String getLocation()
@Nonnull public String getParamName()
public void setApiKey(@Nonnull String apiKey)
apiKey
- The API key@Nonnull public String getApiKeyPrefix()
public void setApiKeyPrefix(@Nonnull String apiKeyPrefix)
apiKeyPrefix
- The API key prefixpublic void applyToParams(@Nonnull org.springframework.util.MultiValueMap<String,String> queryParams, @Nonnull org.springframework.http.HttpHeaders headerParams)
applyToParams
in interface Authentication
queryParams
- The query parameters for the requestheaderParams
- The header parameters for the requestCopyright © 2020 SAP SE. All rights reserved.