use of io.getlime.security.powerauth.soap.spring.client.PowerAuthServiceClient in project powerauth-restful-integration by lime-company.
the class PowerAuthWebServiceConfiguration method powerAuthClient.
/**
* Prepare a correctly configured PowerAuthServiceClient instance with the service
* URL specified using 'powerauth.service.url' server property.
* @param marshaller JAXB marshaller
* @return Correctly configured PowerAuthServiceClient instance with the service
* URL specified using 'powerauth.service.url' server property
*/
@Bean
public PowerAuthServiceClient powerAuthClient(Jaxb2Marshaller marshaller) {
PowerAuthServiceClient client = new PowerAuthServiceClient();
client.setDefaultUri(powerAuthServiceUrl);
client.setMarshaller(marshaller);
client.setUnmarshaller(marshaller);
// if there is a configuration with security credentials, add interceptor
if (!clientToken.isEmpty()) {
ClientInterceptor[] interceptors = new ClientInterceptor[] { securityInterceptor() };
client.setInterceptors(interceptors);
}
return client;
}
Aggregations