public class KerberosRestTemplate
extends org.springframework.web.client.RestTemplate
RestTemplate
that is able to make kerberos SPNEGO authenticated REST
requests. Under a hood this KerberosRestTemplate
is using HttpClient
to
support Kerberos.
Generally this template can be configured in few different ways.
Constructor and Description |
---|
KerberosRestTemplate()
Instantiates a new kerberos rest template.
|
KerberosRestTemplate(org.apache.http.client.HttpClient httpClient)
Instantiates a new kerberos rest template.
|
KerberosRestTemplate(java.util.Map<java.lang.String,java.lang.Object> loginOptions)
Instantiates a new kerberos rest template.
|
KerberosRestTemplate(java.util.Map<java.lang.String,java.lang.Object> loginOptions,
org.apache.http.client.HttpClient httpClient)
Instantiates a new kerberos rest template.
|
KerberosRestTemplate(java.lang.String keyTabLocation,
java.lang.String userPrincipal)
Instantiates a new kerberos rest template.
|
KerberosRestTemplate(java.lang.String keyTabLocation,
java.lang.String userPrincipal,
org.apache.http.client.HttpClient httpClient)
Instantiates a new kerberos rest template.
|
KerberosRestTemplate(java.lang.String keyTabLocation,
java.lang.String userPrincipal,
java.util.Map<java.lang.String,java.lang.Object> loginOptions)
Instantiates a new kerberos rest template.
|
Modifier and Type | Method and Description |
---|---|
protected <T> T |
doExecute(java.net.URI url,
org.springframework.http.HttpMethod method,
org.springframework.web.client.RequestCallback requestCallback,
org.springframework.web.client.ResponseExtractor<T> responseExtractor) |
acceptHeaderRequestCallback, delete, delete, delete, exchange, exchange, exchange, exchange, exchange, exchange, exchange, exchange, execute, execute, execute, getErrorHandler, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, getMessageConverters, handleResponse, headersExtractor, headForHeaders, headForHeaders, headForHeaders, httpEntityCallback, httpEntityCallback, optionsForAllow, optionsForAllow, optionsForAllow, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, put, responseEntityExtractor, setErrorHandler, setMessageConverters
getInterceptors, getRequestFactory, setInterceptors
public KerberosRestTemplate()
public KerberosRestTemplate(org.apache.http.client.HttpClient httpClient)
httpClient
- the http clientpublic KerberosRestTemplate(java.lang.String keyTabLocation, java.lang.String userPrincipal)
keyTabLocation
- the key tab locationuserPrincipal
- the user principalpublic KerberosRestTemplate(java.lang.String keyTabLocation, java.lang.String userPrincipal, org.apache.http.client.HttpClient httpClient)
keyTabLocation
- the key tab locationuserPrincipal
- the user principalhttpClient
- the http clientpublic KerberosRestTemplate(java.util.Map<java.lang.String,java.lang.Object> loginOptions)
loginOptions
- the login optionspublic KerberosRestTemplate(java.util.Map<java.lang.String,java.lang.Object> loginOptions, org.apache.http.client.HttpClient httpClient)
loginOptions
- the login optionshttpClient
- the http clientpublic KerberosRestTemplate(java.lang.String keyTabLocation, java.lang.String userPrincipal, java.util.Map<java.lang.String,java.lang.Object> loginOptions)
keyTabLocation
- the key tab locationuserPrincipal
- the user principalloginOptions
- the login optionsprotected final <T> T doExecute(java.net.URI url, org.springframework.http.HttpMethod method, org.springframework.web.client.RequestCallback requestCallback, org.springframework.web.client.ResponseExtractor<T> responseExtractor) throws org.springframework.web.client.RestClientException
doExecute
in class org.springframework.web.client.RestTemplate
org.springframework.web.client.RestClientException