private static Client client(BeanFactory beanFactory) { try { Client client = beanFactory.getBean(Client.class); return new LazyClient(beanFactory, client); } catch (BeansException ex) { return TracingFeignClient.create(beanFactory.getBean(HttpTracing.class), new Client.Default(null, null)); } }
private static Client client(BeanFactory beanFactory) { try { Client client = beanFactory.getBean(Client.class); return new LazyClient(beanFactory, client); } catch (BeansException ex) { return TracingFeignClient.create(beanFactory.getBean(HttpTracing.class), new Client.Default(null, null)); } }
/** * @deprecated Use the {@link RibbonClient#create()} */ @Deprecated public RibbonClient() { this(new Client.Default(null, null)); }
/** * Create and return DCR(M) service stubs * * @param dcrEndpoint DCR(M) Endpoint * @param username Username of Key Manager * @param password Password of Key Manager * @param kmCertAlias Alias of Public Key of Key Manager * @return DCR(M) service stubs * @throws APIManagementException if error occurs while crating DCR(M) service stub */ public static DCRMServiceStub getDCRMServiceStub(String dcrEndpoint, String username, String password, String kmCertAlias) throws APIManagementException { return Feign.builder() .requestInterceptor(new BasicAuthRequestInterceptor(username, password)) .encoder(new GsonEncoder()) .decoder(new GsonDecoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(kmCertAlias), (hostname, sslSession) -> true)) .target(DCRMServiceStub.class, dcrEndpoint); }
/** * Create and return OAuth2 Introspection service stubs * * @return OAuth2 introspection service stub * @throws APIManagementException if error occurs while crating OAuth2 introspection service stub */ public OAuth2ServiceStubs.IntrospectionServiceStub getIntrospectionServiceStub() throws APIManagementException { return Feign.builder() .requestInterceptor(new BasicAuthRequestInterceptor(username, password)) .encoder(new FormEncoder()) .decoder(new GsonDecoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(kmCertAlias), (hostname, sslSession) -> true)) .target(OAuth2ServiceStubs.IntrospectionServiceStub.class, introspectEndpoint); } /**
/** * Create and return OAuth2 Introspection service stubs * * @return OAuth2 introspection service stub * @throws APIManagementException if error occurs while crating OAuth2 introspection service stub */ public OAuth2ServiceStubs.IntrospectionServiceStub getIntrospectionServiceStub() throws APIManagementException { return Feign.builder() .requestInterceptor(new BasicAuthRequestInterceptor(username, password)) .encoder(new FormEncoder()) .decoder(new GsonDecoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(kmCertAlias), (hostname, sslSession) -> true)) .target(OAuth2ServiceStubs.IntrospectionServiceStub.class, introspectEndpoint); } /**
/** * Create and return SCIM service stubs * * @param idpBaseUrl Base URL of Identity Provider Server * @param username Username of IDP * @param password Password of IDP * @param idpCertAlias Alias of Public Key of IDP * @return SCIM Service client * @throws APIManagementException if error occurs while crating SCIM service stub */ public static SCIMServiceStub getSCIMServiceStub(String idpBaseUrl, String username, String password, String idpCertAlias) throws APIManagementException { return Feign.builder() .requestInterceptor(new BasicAuthRequestInterceptor(username, password)) .encoder(new GsonEncoder()) .decoder(new GsonDecoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(idpCertAlias), (hostname, sslSession) -> true)) .target(SCIMServiceStub.class, idpBaseUrl + WSO2_SCIM_BASE_PATH); }
/** * Create and return OAuth2 token service stubs * * @return OAuth2 token service stub * @throws APIManagementException if error occurs while crating OAuth2 token service stub */ public OAuth2ServiceStubs.TokenServiceStub getTokenServiceStub() throws APIManagementException { return Feign.builder() .encoder(new FormEncoder()) .decoder(new GsonDecoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(kmCertAlias), (hostname, sslSession) -> true)) .target(OAuth2ServiceStubs.TokenServiceStub.class, tokenEndpoint); }
/** * Create and return OAuth2 UserInfo service stubs * * @return OAuth2 introspection service stub * @throws APIManagementException if error occurs while crating OAuth2 introspection service stub */ public OAuth2ServiceStubs.UserInfoServiceStub getUserInfoServiceStub() throws APIManagementException { return Feign.builder() .encoder(new FormEncoder()) .decoder(new GsonDecoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(kmCertAlias), (hostname, sslSession) -> true)) .target(OAuth2ServiceStubs.UserInfoServiceStub.class, userInfoEndpoint); }
/** * Create and return OAuth2 token service stubs * * @return OAuth2 token service stub * @throws APIManagementException if error occurs while crating OAuth2 token service stub */ public OAuth2ServiceStubs.TokenServiceStub getTokenServiceStub() throws APIManagementException { return Feign.builder() .encoder(new FormEncoder()) .decoder(new GsonDecoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(kmCertAlias), (hostname, sslSession) -> true)) .target(OAuth2ServiceStubs.TokenServiceStub.class, tokenEndpoint); }
/** * Create and return OAuth2 UserInfo service stubs * * @return OAuth2 introspection service stub * @throws APIManagementException if error occurs while crating OAuth2 introspection service stub */ public OAuth2ServiceStubs.UserInfoServiceStub getUserInfoServiceStub() throws APIManagementException { return Feign.builder() .encoder(new FormEncoder()) .decoder(new GsonDecoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(kmCertAlias), (hostname, sslSession) -> true)) .target(OAuth2ServiceStubs.UserInfoServiceStub.class, userInfoEndpoint); }
public Client newDefaultClientInstance() { if (!isHostnameVerifierEnabled) { return new Client.Default(null, (hostName, sslSession) -> true); } else { return new Client.Default(null, null); } }
private static Client client(BeanFactory beanFactory) { try { Client client = beanFactory.getBean(Client.class); return new LazyClient(beanFactory, client); } catch (BeansException ex) { return TracingFeignClient.create(beanFactory.getBean(HttpTracing.class), new Client.Default(null, null)); } }
private static Client client(BeanFactory beanFactory) { try { Client client = beanFactory.getBean(Client.class); return new LazyClient(beanFactory, client); } catch (BeansException ex) { return TracingFeignClient.create(beanFactory.getBean(HttpTracing.class), new Client.Default(null, null)); } }
/** * Create and return OAuth2 revoke service stubs * * @return OAuth2 revoke service stub * @throws APIManagementException if error occurs while crating OAuth2 revoke service stub */ public OAuth2ServiceStubs.RevokeServiceStub getRevokeServiceStub() throws APIManagementException { return Feign.builder() .encoder(new FormEncoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(kmCertAlias), (hostname, sslSession) -> true)) .target(OAuth2ServiceStubs.RevokeServiceStub.class, revokeEndpoint); }
/** * Create and return OAuth2 revoke service stubs * * @return OAuth2 revoke service stub * @throws APIManagementException if error occurs while crating OAuth2 revoke service stub */ public OAuth2ServiceStubs.RevokeServiceStub getRevokeServiceStub() throws APIManagementException { return Feign.builder() .encoder(new FormEncoder()) .client(new Client.Default(AMSSLSocketFactory.getSSLSocketFactory(kmCertAlias), (hostname, sslSession) -> true)) .target(OAuth2ServiceStubs.RevokeServiceStub.class, revokeEndpoint); }
@Bean @ConditionalOnMissingBean public Client feignClient(CachingSpringLoadBalancerFactory cachingFactory, SpringClientFactory clientFactory) { return new LoadBalancerFeignClient(new Client.Default(null, null), cachingFactory, clientFactory); } }
@Bean @ConditionalOnMissingBean public Client feignClient(CachingSpringLoadBalancerFactory cachingFactory, SpringClientFactory clientFactory) { return new LoadBalancerFeignClient(new Client.Default(null, null), cachingFactory, clientFactory); } }
public RibbonClient build() { return new RibbonClient( delegate != null ? delegate : new Client.Default(null, null), lbClientFactory != null ? lbClientFactory : new LBClientFactory.Default() ); } }
FescarFeignClient(BeanFactory beanFactory) { this.beanFactory = beanFactory; this.delegate = new Client.Default(null, null); }