public class KeycloakRestTemplate
extends org.springframework.web.client.RestTemplate
implements org.springframework.web.client.RestOperations
RestTemplate, adding
automatic authentication for service to service calls using the currently authenticated Keycloak principal.
This class is designed to work with other services secured by Keycloak.
The main advantage to using this class over Spring's RestTemplate is that authentication
is handled automatically when both the service making the API call and the service being called are
protected by Keycloak authentication.
RestOperations,
RestTemplate| Constructor and Description |
|---|
KeycloakRestTemplate(KeycloakClientRequestFactory factory)
Create a new instance based on the given
KeycloakClientRequestFactory. |
delete, delete, delete, doExecute, exchange, exchange, exchange, exchange, exchange, exchange, execute, execute, execute, getErrorHandler, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, getMessageConverters, headForHeaders, headForHeaders, headForHeaders, optionsForAllow, optionsForAllow, optionsForAllow, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, put, setErrorHandler, setMessageConvertersgetInterceptors, getRequestFactory, setInterceptorscreateRequest, setRequestFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, delete, delete, exchange, exchange, exchange, exchange, exchange, exchange, execute, execute, execute, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, headForHeaders, headForHeaders, headForHeaders, optionsForAllow, optionsForAllow, optionsForAllow, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, putpublic KeycloakRestTemplate(KeycloakClientRequestFactory factory)
KeycloakClientRequestFactory.factory - the KeycloakClientRequestFactory to use when creating new requestsCopyright © 2020 JBoss by Red Hat. All rights reserved.