org.cloudfoundry.uaa.UaaClient Java Examples

The following examples show how to use org.cloudfoundry.uaa.UaaClient. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CloudFoundryAppDeployerAutoConfiguration.java    From spring-cloud-app-broker with Apache License 2.0 5 votes vote down vote up
/**
 * Provide a {@link CloudFoundryOperations} bean
 *
 * @param properties the CloudFoundryTargetProperties bean
 * @param client the CloudFoundryClient bean
 * @param dopplerClient the DopplerClient bean
 * @param uaaClient the UaaClient bean
 * @return the bean
 */
@Bean
public CloudFoundryOperations cloudFoundryOperations(CloudFoundryTargetProperties properties,
	CloudFoundryClient client, DopplerClient dopplerClient, @UaaClientQualifier UaaClient uaaClient) {
	return DefaultCloudFoundryOperations.builder()
		.cloudFoundryClient(client)
		.dopplerClient(dopplerClient)
		.uaaClient(uaaClient)
		.organization(properties.getDefaultOrg())
		.space(properties.getDefaultSpace())
		.build();
}
 
Example #2
Source File: CloudFoundryClientConfiguration.java    From spring-cloud-app-broker with Apache License 2.0 5 votes vote down vote up
@Bean
protected CloudFoundryOperations cloudFoundryOperations(CloudFoundryProperties properties,
	CloudFoundryClient client,
	DopplerClient dopplerClient,
	UaaClient uaaClient) {
	return DefaultCloudFoundryOperations.builder()
		.cloudFoundryClient(client)
		.dopplerClient(dopplerClient)
		.uaaClient(uaaClient)
		.organization(properties.getDefaultOrg())
		.space(properties.getDefaultSpace())
		.build();
}
 
Example #3
Source File: CloudFoundryClientConfiguration.java    From spring-cloud-app-broker with Apache License 2.0 5 votes vote down vote up
@Bean
protected UaaClient uaaClient(ConnectionContext connectionContext,
	@Qualifier("clientCredentials") TokenProvider tokenProvider) {
	return ReactorUaaClient.builder()
		.connectionContext(connectionContext)
		.tokenProvider(tokenProvider)
		.build();
}
 
Example #4
Source File: CfConfiguration.java    From spring-cloud-release-tools with Apache License 2.0 5 votes vote down vote up
@Bean
DefaultCloudFoundryOperations defaultCloudFoundryOperations(
		CloudFoundryClient cloudFoundryClient, DopplerClient dopplerClient,
		UaaClient uaaClient, @Value("${cf.organization}") String organizationId,
		@Value("${cf.space}") String spaceId) {
	return DefaultCloudFoundryOperations.builder()
			.cloudFoundryClient(cloudFoundryClient).dopplerClient(dopplerClient)
			.uaaClient(uaaClient).organization(organizationId).space(spaceId).build();
}
 
Example #5
Source File: CloudFoundryClientAutoConfiguration.java    From spring-cloud-cloudfoundry with Apache License 2.0 5 votes vote down vote up
@Bean
@Lazy
@ConditionalOnMissingBean
public DefaultCloudFoundryOperations cloudFoundryOperations(
		CloudFoundryClient cloudFoundryClient, DopplerClient dopplerClient,
		RoutingClient routingClient, UaaClient uaaClient) {
	String organization = this.cloudFoundryProperties.getOrg();
	String space = this.cloudFoundryProperties.getSpace();
	return DefaultCloudFoundryOperations.builder()
			.cloudFoundryClient(cloudFoundryClient).dopplerClient(dopplerClient)
			.routingClient(routingClient).uaaClient(uaaClient)
			.organization(organization).space(space).build();
}
 
Example #6
Source File: CloudFoundryOAuth2Client.java    From spring-cloud-app-broker with Apache License 2.0 4 votes vote down vote up
public CloudFoundryOAuth2Client(UaaClient uaaClient) {
	this.uaaClient = uaaClient;
}
 
Example #7
Source File: UaaService.java    From spring-cloud-app-broker with Apache License 2.0 4 votes vote down vote up
public UaaService(UaaClient uaaClient) {
	this.uaaClient = uaaClient;
}
 
Example #8
Source File: CloudFoundryAppDeployerAutoConfiguration.java    From spring-cloud-app-broker with Apache License 2.0 2 votes vote down vote up
/**
 * Provide an {@link OAuth2Client} bean
 *
 * @param uaaClient the UaaClient bean
 * @return the bean
 */
@Bean
public OAuth2Client cloudFoundryOAuth2Client(@UaaClientQualifier UaaClient uaaClient) {
	return new CloudFoundryOAuth2Client(uaaClient);
}