use of org.springframework.web.context.annotation.RequestScope in project workbench by all-of-us.
the class NotebooksConfig method notebooksApi.
@Bean
@RequestScope(proxyMode = ScopedProxyMode.DEFAULT)
public NotebooksApi notebooksApi(@Qualifier(NOTEBOOKS_CLIENT) ApiClient apiClient) {
NotebooksApi api = new NotebooksApi();
api.setApiClient(apiClient);
return api;
}
use of org.springframework.web.context.annotation.RequestScope in project workbench by all-of-us.
the class NotebooksConfig method clusterApi.
@Bean
@RequestScope(proxyMode = ScopedProxyMode.DEFAULT)
public ClusterApi clusterApi(@Qualifier(NOTEBOOKS_CLIENT) ApiClient apiClient) {
ClusterApi api = new ClusterApi();
api.setApiClient(apiClient);
return api;
}
use of org.springframework.web.context.annotation.RequestScope in project workbench by all-of-us.
the class FireCloudConfig method billingApi.
@Bean
@RequestScope(proxyMode = ScopedProxyMode.DEFAULT)
public BillingApi billingApi(@Qualifier(ALL_OF_US_API_CLIENT) ApiClient apiClient) {
// Billing calls are made by the AllOfUs service account, rather than using the end user's
// credentials.
BillingApi api = new BillingApi();
api.setApiClient(apiClient);
return api;
}
use of org.springframework.web.context.annotation.RequestScope in project workbench by all-of-us.
the class FireCloudConfig method allOfUsApiClient.
@Bean(name = ALL_OF_US_API_CLIENT)
@RequestScope(proxyMode = ScopedProxyMode.DEFAULT)
public ApiClient allOfUsApiClient(WorkbenchEnvironment workbenchEnvironment, WorkbenchConfig workbenchConfig) {
ApiClient apiClient = new ApiClient();
try {
apiClient.setAccessToken(getWorkbenchServiceAccountAccessToken(workbenchEnvironment));
apiClient.setDebugging(workbenchConfig.firecloud.debugEndpoints);
} catch (IOException e) {
throw new ServerErrorException(e);
}
return apiClient;
}
use of org.springframework.web.context.annotation.RequestScope in project workbench by all-of-us.
the class FireCloudConfig method profileApi.
@Bean
@RequestScope(proxyMode = ScopedProxyMode.DEFAULT)
public ProfileApi profileApi(@Qualifier(END_USER_API_CLIENT) ApiClient apiClient) {
ProfileApi api = new ProfileApi();
api.setApiClient(apiClient);
return api;
}
Aggregations