public final class ClientCredentialsHttpDestination extends AbstractHttpDestination
HttpDestination
implementation automatically
adding an authentication header retrieved from an XSUAA service with client credentials.Constructor and Description |
---|
ClientCredentialsHttpDestination(HttpDestinationProperties baseDestination,
ClientCredentials clientCredentials,
ClientCredentialsGrantType grantType,
URI xsuaaUri,
XsuaaService xsuaaService)
Wraps the given destination and adds the authentication header retrieved from the given XSUAA service with the
given credentials via the given grant type.
|
ClientCredentialsHttpDestination(HttpDestinationProperties baseDestination,
ClientCredentials clientCredentials,
URI xsuaaUri,
XsuaaService xsuaaService)
Wraps the given destination and adds the authentication header retrieved from the given XSUAA service with the
given credentials via the
ClientCredentialsGrantType.CLIENT_CREDENTIALS grant type. |
Modifier and Type | Method and Description |
---|---|
AuthenticationType |
getAuthenticationType()
Returns the authentication type to be expected when authenticating at the remote system.
|
ClientCredentials |
getClientCredentials()
Returns the credentials to be used to retrieve the AuthToken.
|
Collection<Header> |
getHeaders(URI requestUri)
Getter for a collection of header that should be added to the outgoing request for this destination.
|
URI |
getXsuaaUri()
Returns the URI to be used to retrieve the AuthToken.
|
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 ClientCredentialsHttpDestination(@Nonnull HttpDestinationProperties baseDestination, @Nonnull ClientCredentials clientCredentials, @Nonnull URI xsuaaUri, @Nonnull XsuaaService xsuaaService)
ClientCredentialsGrantType.CLIENT_CREDENTIALS
grant type.baseDestination
- The destination to wrap.clientCredentials
- The credentials to be used to retrieve the AuthToken.xsuaaUri
- The URI of the XSUAA service to retrieve the AuthToken from.xsuaaService
- XsuaaService instance to be used to retrieve the AuthToken.public ClientCredentialsHttpDestination(@Nonnull HttpDestinationProperties baseDestination, @Nonnull ClientCredentials clientCredentials, @Nullable ClientCredentialsGrantType grantType, @Nonnull URI xsuaaUri, @Nonnull XsuaaService xsuaaService)
baseDestination
- The destination to wrap.clientCredentials
- The credentials to be used to retrieve the AuthToken.grantType
- The grant type to retrieve the access token with.xsuaaUri
- The URI of the XSUAA service to retrieve the AuthToken from.xsuaaService
- XsuaaService instance to be used to retrieve the AuthToken.@Nonnull public URI getXsuaaUri()
@Nonnull public ClientCredentials getClientCredentials()
@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.