• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java TokenProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.cloudfoundry.reactor.TokenProvider的典型用法代码示例。如果您正苦于以下问题:Java TokenProvider类的具体用法?Java TokenProvider怎么用?Java TokenProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TokenProvider类属于org.cloudfoundry.reactor包,在下文中一共展示了TokenProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: doCreateOperations

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
private CloudFoundryOperations doCreateOperations(CloudFoundryClient cloudFoundryClient,
														 ConnectionContext connectionContext,
														 TokenProvider tokenProvider,
														 String org,
														 String space) {
	ReactorDopplerClient dopplerClient = ReactorDopplerClient.builder()
			.connectionContext(connectionContext)
			.tokenProvider(tokenProvider)
			.build();

	ReactorUaaClient uaaClient = ReactorUaaClient.builder()
			.connectionContext(connectionContext)
			.tokenProvider(tokenProvider)
			.build();

	return DefaultCloudFoundryOperations.builder()
			.cloudFoundryClient(cloudFoundryClient)
			.dopplerClient(dopplerClient)
			.uaaClient(uaaClient)
			.organization(org)
			.space(space)
			.build();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:24,代码来源:DefaultAppDeployerFactory.java


示例2: createCloudFoundryOperations

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
private CloudFoundryOperations createCloudFoundryOperations() {
    DefaultConnectionContext connectionContext = DefaultConnectionContext.builder()
        .apiHost(apiHost)
        .build();

    TokenProvider tokenProvider = PasswordGrantTokenProvider.builder()
        .password(password)
        .username(userName)
        .build();

    ReactorCloudFoundryClient reactorClient = ReactorCloudFoundryClient.builder()
        .connectionContext(connectionContext)
        .tokenProvider(tokenProvider)
        .build();

    CloudFoundryOperations cloudFoundryOperations = DefaultCloudFoundryOperations.builder()
        .cloudFoundryClient(reactorClient)
        .organization(organization)
        .space(space)
        .build();

    return cloudFoundryOperations;
}
 
开发者ID:StuPro-TOSCAna,项目名称:TOSCAna,代码行数:24,代码来源:Connection.java


示例3: setup

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Before
public void setup()
{
	String host = System.getenv("CF_HOST");
	String username = System.getenv("CF_USERNAME");
	String password = System.getenv("CF_PASSWORD");

	if(host == null || username == null || password == null)
	{
		throw new RuntimeException("CF_HOST, CF_USERNAME and CF_PASSWORD must be set");
	}

	ConnectionContext connectionContext = DefaultConnectionContext.builder().apiHost(host).skipSslValidation(true).build();
	TokenProvider tokenProvider = PasswordGrantTokenProvider.builder().username(username).password(password).build();

	ReactorUaaClient uaaClient = ReactorUaaClient.builder().connectionContext(connectionContext).tokenProvider(tokenProvider).build();
	uaa = new ReactorUaaClientFacade(uaaClient);
}
 
开发者ID:EngineerBetter,项目名称:cf-converger,代码行数:19,代码来源:ReactorUaaFacadeIntegrationTest.java


示例4: setup

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Before
public void setup()
{
	String host = System.getenv("CF_HOST");
	String username = System.getenv("CF_USERNAME");
	String password = System.getenv("CF_PASSWORD");

	if(host == null || username == null || password == null)
	{
		throw new RuntimeException("CF_HOST, CF_USERNAME and CF_PASSWORD must be set");
	}

	ConnectionContext connectionContext = DefaultConnectionContext.builder().apiHost(host).skipSslValidation(true).build();
	TokenProvider tokenProvider = PasswordGrantTokenProvider.builder().username(username).password(password).build();
	cfClient = ReactorCloudFoundryClient.builder().connectionContext(connectionContext).tokenProvider(tokenProvider).build();
	cfOps = DefaultCloudFoundryOperations.builder().cloudFoundryClient(cfClient).build();
	facade = new ReactorCfClientFacade(cfClient, mock(ModifyingUserOps.class));
}
 
开发者ID:EngineerBetter,项目名称:cf-converger,代码行数:19,代码来源:ReactorCfClientFacadeOrgsIntegrationTest.java


示例5: getCfOperations

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
protected CloudFoundryOperations getCfOperations() {
    CfProperties cfAppProperties = this.cfPropertiesMapper.getProperties();

    ConnectionContext connectionContext = DefaultConnectionContext.builder()
        .apiHost(cfAppProperties.ccHost())
        .skipSslValidation(true)
        .proxyConfiguration(tryGetProxyConfiguration(cfAppProperties))
        .build();

    TokenProvider tokenProvider = getTokenProvider(cfAppProperties);

    CloudFoundryClient cfClient = ReactorCloudFoundryClient.builder()
        .connectionContext(connectionContext)
        .tokenProvider(tokenProvider)
        .build();

    CloudFoundryOperations cfOperations = DefaultCloudFoundryOperations.builder()
        .cloudFoundryClient(cfClient)
        .organization(cfAppProperties.org())
        .space(cfAppProperties.space())
        .build();

    return cfOperations;
}
 
开发者ID:pivotalservices,项目名称:ya-cf-app-gradle-plugin,代码行数:25,代码来源:AbstractCfTask.java


示例6: cloudFoundryOperations

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
public CloudFoundryOperations cloudFoundryOperations(CloudFoundryClient cloudFoundryClient,
													 ConnectionContext connectionContext,
													 TokenProvider tokenProvider,
													 CloudFoundryConnectionProperties properties) {
	ReactorDopplerClient.builder()
		.connectionContext(connectionContext)
		.tokenProvider(tokenProvider)
		.build();

	ReactorUaaClient.builder()
		.connectionContext(connectionContext)
		.tokenProvider(tokenProvider)
		.build();

	return DefaultCloudFoundryOperations.builder()
		.cloudFoundryClient(cloudFoundryClient)
		.organization(properties.getOrg())
		.space(properties.getSpace())
		.build();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-cloudfoundry,代码行数:22,代码来源:CloudFoundryTestSupport.java


示例7: cloudFoundryClient

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
public ReactorCloudFoundryClient cloudFoundryClient(
        ConnectionContext connectionContext,
        TokenProvider tokenProvider) {
    return ReactorCloudFoundryClient
            .builder()
            .connectionContext(connectionContext)
            .tokenProvider(tokenProvider).build();
}
 
开发者ID:applied-continuous-delivery-livelessons,项目名称:testing-101,代码行数:10,代码来源:CloudFoundryClientConfiguration.java


示例8: dopplerClient

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
public ReactorDopplerClient dopplerClient(ConnectionContext connectionContext,
                                          TokenProvider tokenProvider) {
    return ReactorDopplerClient
            .builder()
            .connectionContext(connectionContext)
            .tokenProvider(tokenProvider)
            .build();
}
 
开发者ID:applied-continuous-delivery-livelessons,项目名称:testing-101,代码行数:10,代码来源:CloudFoundryClientConfiguration.java


示例9: uaaClient

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
ReactorUaaClient uaaClient(ConnectionContext ctx, TokenProvider tokenProvider) {
    return ReactorUaaClient
            .builder()
            .connectionContext(ctx)
            .tokenProvider(tokenProvider)
            .build();
}
 
开发者ID:applied-continuous-delivery-livelessons,项目名称:testing-101,代码行数:9,代码来源:CloudFoundryClientConfiguration.java


示例10: getOperations

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Override
public CloudFoundryOperations getOperations(String email, String password, URL apiEndpoint, String org, String space) {
	CloudFoundryClient client = getCloudFoundryClient(email, password, apiEndpoint);
	ConnectionContext context = connectionContext(apiEndpoint);
	TokenProvider tokenProvider = tokenProvider(email, password);
	return doCreateOperations(client, context, tokenProvider, org, space);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:8,代码来源:DefaultAppDeployerFactory.java


示例11: cloudFoundryClient

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
ReactorCloudFoundryClient cloudFoundryClient(ConnectionContext connectionContext, TokenProvider tokenProvider) {
    return ReactorCloudFoundryClient.builder()
        .connectionContext(connectionContext)
        .tokenProvider(tokenProvider)
        .build();
}
 
开发者ID:nebhale,项目名称:cf-java-client-webinar-2016,代码行数:8,代码来源:ListApplicationsApplication.java


示例12: cloudFoundryClient

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
CloudFoundryClient cloudFoundryClient(ConnectionContext connectionContext, TokenProvider tokenProvider)
{
	return ReactorCloudFoundryClient.builder()
			.connectionContext(connectionContext)
			.tokenProvider(tokenProvider)
			.build();
}
 
开发者ID:EngineerBetter,项目名称:cf-converger,代码行数:9,代码来源:CfConfig.java


示例13: uaaClient

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
UaaClient uaaClient(ConnectionContext connectionContext, TokenProvider tokenProvider) {
	return ReactorUaaClient.builder()
			.connectionContext(connectionContext)
			.tokenProvider(tokenProvider)
			.build();
}
 
开发者ID:EngineerBetter,项目名称:cf-converger,代码行数:8,代码来源:CfConfig.java


示例14: cloudFoundryClient

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean(initMethod = "checkCompatibility")
ReactorCloudFoundryClient cloudFoundryClient(ConnectionContext connectionContext, TokenProvider tokenProvider) {
    return ReactorCloudFoundryClient.builder()
            .connectionContext(connectionContext)
            .tokenProvider(tokenProvider)
            .build();
}
 
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:8,代码来源:IntegrationTestConfiguration.java


示例15: cloudFoundryClient

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
ReactorCloudFoundryClient cloudFoundryClient(ConnectionContext connectionContext, TokenProvider tokenProvider) {
    return ReactorCloudFoundryClient.builder()
            .connectionContext(connectionContext)
            .tokenProvider(tokenProvider)
            .build();
}
 
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:8,代码来源:CloudfoundryClientConfig.java


示例16: getTokenProvider

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
protected TokenProvider getTokenProvider(CfProperties cfAppProperties) {
    if (cfAppProperties.ccToken() == null &&
        (cfAppProperties.ccUser() == null && cfAppProperties.ccPassword() == null)) {
        throw new IllegalStateException("One of token or user/password should be provided");
    }

    if (cfAppProperties.ccToken() != null) {
        return new StaticTokenProvider(cfAppProperties.ccToken());
    } else {
        return PasswordGrantTokenProvider.builder()
            .password(cfAppProperties.ccPassword())
            .username(cfAppProperties.ccUser())
            .build();
    }
}
 
开发者ID:pivotalservices,项目名称:ya-cf-app-gradle-plugin,代码行数:16,代码来源:AbstractCfTask.java


示例17: getAppDetailTests

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Test
    public void getAppDetailTests() {
        ConnectionContext connectionContext = DefaultConnectionContext.builder()
            .apiHost("api.local.pcfdev.io")
            .skipSslValidation(true)
            .build();

        TokenProvider tokenProvider = PasswordGrantTokenProvider.builder()
            .password("admin")
            .username("admin")
            .build();

        CloudFoundryClient cfClient = ReactorCloudFoundryClient.builder()
            .connectionContext(connectionContext)
            .tokenProvider(tokenProvider)
            .build();

        CloudFoundryOperations cfOperations = DefaultCloudFoundryOperations.builder()
            .cloudFoundryClient(cfClient)
            .organization("pcfdev-org")
            .space("pcfdev-space")
            .build();

        CfAppDetailsDelegate appDetailsTaskDelegate = new CfAppDetailsDelegate();
        CfProperties cfAppProps = envDetails();
        Mono<Optional<ApplicationDetail>> applicationDetailMono = appDetailsTaskDelegate
            .getAppDetails(cfOperations, cfAppProps);


//		Mono<Void> resp = applicationDetailMono.then(applicationDetail -> Mono.fromSupplier(() -> {
//			return 1;
//		})).then();
//
//		resp.block();
//		ApplicationDetail applicationDetail = applicationDetailMono.block(Duration.ofMillis(5000));
//		System.out.println("applicationDetail = " + applicationDetail);
    }
 
开发者ID:pivotalservices,项目名称:ya-cf-app-gradle-plugin,代码行数:38,代码来源:PcfDevIntegrationTests.java


示例18: cloudFoundryClient

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public CloudFoundryClient cloudFoundryClient(ConnectionContext connectionContext, TokenProvider tokenProvider) {
	return ReactorCloudFoundryClient.builder()
		.connectionContext(connectionContext)
		.tokenProvider(tokenProvider)
		.build();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-cloudfoundry,代码行数:9,代码来源:CloudFoundryDeployerAutoConfiguration.java


示例19: tokenProvider

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public TokenProvider tokenProvider(CloudFoundryConnectionProperties properties) {
	return PasswordGrantTokenProvider.builder()
		.username(properties.getUsername())
		.password(properties.getPassword())
		.build();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-cloudfoundry,代码行数:9,代码来源:CloudFoundryDeployerAutoConfiguration.java


示例20: tokenProvider

import org.cloudfoundry.reactor.TokenProvider; //导入依赖的package包/类
@Bean
public TokenProvider tokenProvider(CloudFoundryConnectionProperties properties) {
	return PasswordGrantTokenProvider.builder()
			.username(properties.getUsername())
			.password(properties.getPassword())
			.build();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-cloudfoundry,代码行数:8,代码来源:CloudFoundryTestSupport.java



注:本文中的org.cloudfoundry.reactor.TokenProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WebApplicationService类代码示例发布时间:2022-05-22
下一篇:
Java FrameCompressor类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap