public class CustomTokenHttpDestination extends AbstractHttpDestination
Constructor and Description |
---|
CustomTokenHttpDestination(HttpDestinationProperties baseDestination,
String accessToken)
Creates a new
HttpDestination on the basis of an existing HttpDestinationProperties with a custom
access token to be used in the authorization header. |
Modifier and Type | Method and Description |
---|---|
AuthenticationType |
getAuthenticationType()
Returns the authentication type to be expected when authenticating at the remote system.
|
Collection<Header> |
getHeaders(URI requestUri)
Getter for a collection of header that should be added to the outgoing request for this destination.
|
get, get, get, get, getBasicCredentials, getKeyStore, getKeyStorePassword, getPropertyNames, getProxyConfiguration, getProxyType, getTlsVersion, getTrustStore, getTrustStorePassword, getUri, isTrustingAllCertificates
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decorate
public CustomTokenHttpDestination(@Nonnull HttpDestinationProperties baseDestination, @Nonnull String accessToken)
HttpDestination
on the basis of an existing HttpDestinationProperties
with a custom
access token to be used in the authorization header.baseDestination
- An HttpDestinationProperties
as basis.accessToken
- A string representation of an access token to be used in the authorization header, e.g.
"Bearer 1234abc..."
@Nonnull public AuthenticationType getAuthenticationType()
getAuthenticationType
in interface HttpDestinationProperties
getAuthenticationType
in class AbstractHttpDestination
@Nonnull public Collection<Header> getHeaders(@Nonnull URI requestUri) throws DestinationAccessException
getHeaders
in interface HttpDestinationProperties
getHeaders
in class AbstractHttpDestination
requestUri
- The target URI of a request to which HTTP headers should be added.DestinationAccessException
Copyright © 2020 SAP SE. All rights reserved.