Class MsalClientAdapter
- java.lang.Object
-
- nl.nn.adapterframework.http.HttpSessionBase
-
- nl.nn.adapterframework.http.HttpSenderBase
-
- nl.nn.adapterframework.filesystem.MsalClientAdapter
-
- All Implemented Interfaces:
com.microsoft.aad.msal4j.IHttpClient
,CanUseSharedResource<org.apache.http.impl.client.CloseableHttpClient>
,HasPhysicalDestination
,IConfigurable
,IConfigurationAware
,INamedObject
,IScopeProvider
,ISender
,ISenderWithParameters
,IWithParameters
,HasKeystore
,HasTruststore
,ConfigurableLifecycle
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.Lifecycle
@Protected public class MsalClientAdapter extends HttpSenderBase implements com.microsoft.aad.msal4j.IHttpClient
This class ensures that Microsoft Authentication Library (MSAL) requests are sent through the configured proxy and the correct SSLSocketFactory.- See Also:
ExchangeFileSystem
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nl.nn.adapterframework.http.HttpSenderBase
HttpSenderBase.HttpMethod
-
-
Field Summary
-
Fields inherited from class nl.nn.adapterframework.http.HttpSenderBase
CORRELATION_ID_HEADER, headerParamsSet, MESSAGE_ID_HEADER, parametersToSkipWhenEmptySet, paramList, requestOrBodyParamsSet, staticUri, urlParameter
-
Fields inherited from class nl.nn.adapterframework.http.HttpSessionBase
log
-
-
Constructor Summary
Constructors Constructor Description MsalClientAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Message
extractResult(HttpResponseHandler responseHandler, PipeLineSession session)
Custom implementation to extract the response and format it to a String result.protected org.apache.http.client.methods.HttpRequestBase
getMethod(URI uri, Message message, ParameterValueList parameters, PipeLineSession session)
Custom implementation to create aHttpRequest
object.com.microsoft.aad.msal4j.IHttpResponse
send(com.microsoft.aad.msal4j.HttpRequest httpRequest)
-
Methods inherited from class nl.nn.adapterframework.http.HttpSenderBase
addParameter, appendParameters, close, configure, getCharSet, getContentType, getDomain, getFullContentType, getHeadersParams, getHttpMethod, getLogPrefix, getObjectType, getParameterList, getParametersToSkipWhenEmpty, getPhysicalDestinationName, getResultStatusCodeSessionKey, getStyleSheetName, getUrl, getUrlParam, isXhtml, open, sendMessage, setCertificate, setCertificateAuthAlias, setCertificatePassword, setCertificateType, setCharSet, setContentType, setHeadersParams, setMethodType, setParametersToSkipWhenEmpty, setProxyUserName, setResultStatusCodeSessionKey, setSharedResourceRef, setStyleSheetName, setUrl, setUrlParam, setUserName, setXhtml, start, validateResponseCode
-
Methods inherited from class nl.nn.adapterframework.http.HttpSessionBase
areCookiesDisabled, buildHttpClient, configureConnectionManager, execute, getApplicationContext, getAuthAlias, getAuthDomain, getClientAuthAlias, getClientId, getClientSecret, getConfigurationClassLoader, getConnectionIdleTimeout, getConnectionTimeToLive, getHttpClient, getKeyManagerAlgorithm, getKeystore, getKeystoreAlias, getKeystoreAliasAuthAlias, getKeystoreAliasPassword, getKeystoreAuthAlias, getKeystorePassword, getKeystoreType, getMaxConnections, getMaxExecuteRetries, getName, getPassword, getProxyAuthAlias, getProxyHost, getProxyPassword, getProxyPort, getProxyRealm, getProxyUsername, getScope, getSSLConnectionSocketFactory, getStaleTimeout, getTimeout, getTokenEndpoint, getTokenExpiry, getTrustManagerAlgorithm, getTruststore, getTruststoreAuthAlias, getTruststorePassword, getTruststoreType, getURI, getUsername, isAllowSelfSignedCertificates, isAuthenticatedTokenRequest, isFollowRedirects, isIgnoreCertificateExpiredException, isIgnoreRedirects, isPrefillProxyAuthCache, isRunning, isStaleChecking, isVerifyHostname, preAuthenticate, setAllowSelfSignedCertificates, setApplicationContext, setAuthAlias, setAuthDomain, setAuthenticatedTokenRequest, setClientAlias, setClientId, setClientSecret, setConnectionIdleTimeout, setConnectionTimeToLive, setDisableCookies, setFollowRedirects, setHttpClient, setIgnoreCertificateExpiredException, setIgnoreRedirects, setKeyManagerAlgorithm, setKeystore, setKeystoreAlias, setKeystoreAliasAuthAlias, setKeystoreAliasPassword, setKeystoreAuthAlias, setKeystorePassword, setKeystoreType, setMaxConnections, setMaxExecuteRetries, setName, setPassword, setPrefillProxyAuthCache, setProtocol, setProxyAuthAlias, setProxyHost, setProxyPassword, setProxyPort, setProxyRealm, setProxyUsername, setScope, setStaleChecking, setStaleTimeout, setSupportedCipherSuites, setTimeout, setTokenEndpoint, setTokenExpiry, setTrustManagerAlgorithm, setTruststore, setTruststoreAuthAlias, setTruststorePassword, setTruststoreType, setUsername, setVerifyHostname, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
-
Methods inherited from interface nl.nn.adapterframework.core.CanUseSharedResource
getSharedResource
-
Methods inherited from interface nl.nn.adapterframework.core.IConfigurationAware
getApplicationContext, getName
-
Methods inherited from interface nl.nn.adapterframework.core.INamedObject
getName, setName
-
Methods inherited from interface nl.nn.adapterframework.core.IScopeProvider
getConfigurationClassLoader
-
Methods inherited from interface nl.nn.adapterframework.core.ISender
isSynchronous, sendMessageOrThrow
-
Methods inherited from interface nl.nn.adapterframework.core.ISenderWithParameters
consumesSessionVariable
-
-
-
-
Method Detail
-
send
public com.microsoft.aad.msal4j.IHttpResponse send(com.microsoft.aad.msal4j.HttpRequest httpRequest) throws Exception
- Specified by:
send
in interfacecom.microsoft.aad.msal4j.IHttpClient
- Throws:
Exception
-
getMethod
protected org.apache.http.client.methods.HttpRequestBase getMethod(URI uri, Message message, ParameterValueList parameters, PipeLineSession session) throws SenderException
Description copied from class:HttpSenderBase
Custom implementation to create aHttpRequest
object.- Specified by:
getMethod
in classHttpSenderBase
- Parameters:
uri
- endpoint to send the message tomessage
- to be sentparameters
- ParameterValueList that contains all the senders parameterssession
- PipeLineSession to retrieve or store data from, or NULL when not set- Returns:
- a
HttpRequest
object - Throws:
SenderException
-
extractResult
protected Message extractResult(HttpResponseHandler responseHandler, PipeLineSession session)
Description copied from class:HttpSenderBase
Custom implementation to extract the response and format it to a String result.
It is important that theresponse
will be read or will beclosed
.- Specified by:
extractResult
in classHttpSenderBase
- Parameters:
responseHandler
-HttpResponseHandler
that contains the response informationsession
-PipeLineSession
which may be null- Returns:
- a string that will be passed to the pipeline
-
-