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

Java LdapConfiguration类代码示例

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

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



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

示例1: BreakerboxServiceConfiguration

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
@JsonCreator
public BreakerboxServiceConfiguration(@JsonProperty("azure") AzureTableConfiguration azure,
                                      @JsonProperty("tenacityClient") JerseyClientConfiguration tenacityClientConfiguration,
                                      @JsonProperty("breakerboxServicesPropertyKeys") TenacityConfiguration breakerboxServicesPropertyKeys,
                                      @JsonProperty("breakerboxServicesConfiguration") TenacityConfiguration breakerboxServicesConfiguration,
                                      @JsonProperty("breakerbox") BreakerboxConfiguration breakerboxConfiguration,
                                      @JsonProperty("ldap") LdapConfiguration ldapConfiguration,
                                      @JsonProperty("archaiusOverride") ArchaiusOverrideConfiguration archaiusOverride,
                                      @JsonProperty("database") JdbiConfiguration jdbiConfiguration,
                                      @JsonProperty("breakerboxHostAndPort") HostAndPort breakerboxHostAndPort,
                                      @JsonProperty("defaultDashboard") String defaultDashboard) {
    this.azure = Optional.fromNullable(azure);
    this.tenacityClient = tenacityClientConfiguration;
    this.breakerboxServicesPropertyKeys = Optional.fromNullable(breakerboxServicesPropertyKeys).or(new TenacityConfiguration());
    this.breakerboxServicesConfiguration = Optional.fromNullable(breakerboxServicesConfiguration).or(new TenacityConfiguration());
    this.breakerboxConfiguration = breakerboxConfiguration;
    this.ldapConfiguration = Optional.fromNullable(ldapConfiguration);
    this.archaiusOverride = Optional.fromNullable(archaiusOverride).or(new ArchaiusOverrideConfiguration());
    this.jdbiConfiguration = Optional.fromNullable(jdbiConfiguration);
    this.breakerboxHostAndPort = Optional.fromNullable(breakerboxHostAndPort).or(HostAndPort.fromParts("localhost", 20040));
    this.defaultDashboard = Optional.fromNullable(defaultDashboard).or("production");
}
 
开发者ID:guggens,项目名称:log-dropwizard-eureka-mongo-sample,代码行数:23,代码来源:BreakerboxServiceConfiguration.java


示例2: setupLdapAuth

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
private static void setupLdapAuth(LdapConfiguration ldapConfiguration, Environment environment) {
    final LdapAuthenticator ldapAuthenticator = new LdapAuthenticator(ldapConfiguration);
    final ResourceAuthenticator canAuthenticate = new ResourceAuthenticator(
            new LdapCanAuthenticate(ldapConfiguration));
    final CachingAuthenticator<BasicCredentials, BasicCredentials> cachingAuthenticator =
            new CachingAuthenticator<>(
                    environment.metrics(),
                    TenacityAuthenticator.wrap(
                            new ResourceAuthenticator(ldapAuthenticator), BreakerboxDependencyKey.BRKRBX_LDAP_AUTH),
                    ldapConfiguration.getCachePolicy()
            );

    environment.healthChecks().register("ldap-auth", new LdapHealthCheck<>(TenacityAuthenticator
            .wrap(canAuthenticate, BreakerboxDependencyKey.BRKRBX_LDAP_AUTH)));
    environment.jersey().register(new BasicAuthProvider<>(cachingAuthenticator, "breakerbox"));
}
 
开发者ID:guggens,项目名称:log-dropwizard-eureka-mongo-sample,代码行数:17,代码来源:BreakerboxService.java


示例3: setupLdapAuth

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
private static void setupLdapAuth(LdapConfiguration ldapConfiguration, Environment environment) {
    final LdapAuthenticator ldapAuthenticator = new LdapAuthenticator(ldapConfiguration);
    final CachingAuthenticator<BasicCredentials, User> cachingAuthenticator =
            new CachingAuthenticator<>(
                    environment.metrics(),
                    TenacityAuthenticator.wrap(
                            new ResourceAuthenticator(ldapAuthenticator), BreakerboxDependencyKey.BRKRBX_LDAP_AUTH),
                    ldapConfiguration.getCachePolicy()
            );
    environment.jersey().register(new AuthDynamicFeature(
                    new BasicCredentialAuthFilter.Builder<User>()
                            .setAuthenticator(cachingAuthenticator)
                            .setRealm("breakerbox")
                            .buildAuthFilter()));
    environment.jersey().register(new AuthValueFactoryProvider.Binder<>(User.class));
}
 
开发者ID:yammer,项目名称:breakerbox,代码行数:17,代码来源:BreakerboxService.java


示例4: BreakerboxServiceConfiguration

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
@JsonCreator
public BreakerboxServiceConfiguration(@JsonProperty("azure") AzureTableConfiguration azure,
                                      @JsonProperty("tenacityClient") JerseyClientConfiguration tenacityClientConfiguration,
                                      @JsonProperty("breakerboxServicesPropertyKeys") TenacityConfiguration breakerboxServicesPropertyKeys,
                                      @JsonProperty("breakerboxServicesConfiguration") TenacityConfiguration breakerboxServicesConfiguration,
                                      @JsonProperty("breakerbox") BreakerboxConfiguration breakerboxConfiguration,
                                      @JsonProperty("ldap") LdapConfiguration ldapConfiguration,
                                      @JsonProperty("archaiusOverride") ArchaiusOverrideConfiguration archaiusOverride,
                                      @JsonProperty("database") JdbiConfiguration jdbiConfiguration,
                                      @JsonProperty("breakerboxHostAndPort") HostAndPort breakerboxHostAndPort,
                                      @JsonProperty("defaultDashboard") String defaultDashboard,
                                      @JsonProperty("turbine") Path turbine,
                                      @JsonProperty("instanceDiscoveryClass") String instanceDiscoveryClass,
                                      @JsonProperty("hystrixStreamSuffix") String hystrixStreamSuffix,
                                      @JsonProperty("rancherDiscovery") RancherInstanceConfiguration rancherInstanceConfiguration,
                                      @JsonProperty("marathonDiscovery")List<MarathonClientConfiguration> marathonClientConfiguration) {
    this.azure = Optional.ofNullable(azure);
    this.tenacityClient = tenacityClientConfiguration;
    this.breakerboxServicesPropertyKeys = Optional.ofNullable(breakerboxServicesPropertyKeys).orElse(new TenacityConfiguration());
    this.breakerboxServicesConfiguration = Optional.ofNullable(breakerboxServicesConfiguration).orElse(new TenacityConfiguration());
    this.breakerboxConfiguration = breakerboxConfiguration;
    this.ldapConfiguration = Optional.ofNullable(ldapConfiguration);
    this.archaiusOverride = Optional.ofNullable(archaiusOverride).orElse(new ArchaiusOverrideConfiguration());
    this.jdbiConfiguration = Optional.ofNullable(jdbiConfiguration);
    this.breakerboxHostAndPort = Optional.ofNullable(breakerboxHostAndPort).orElse(HostAndPort.fromParts("localhost", 8080));
    this.defaultDashboard = Optional.ofNullable(defaultDashboard).orElse("production");
    this.turbine = Optional.ofNullable(turbine).orElse(Paths.get("breakerbox-instances.yml"));
    this.instanceDiscoveryClass = Objects.isNull(instanceDiscoveryClass) ? Optional.ofNullable(System.getProperty("InstanceDiscovery.impl")) : Optional.of(instanceDiscoveryClass);
    this.hystrixStreamSuffix = Optional.ofNullable(hystrixStreamSuffix);
    this.rancherInstanceConfiguration = Optional.ofNullable(rancherInstanceConfiguration);
    this.marathonClientConfiguration = Optional.ofNullable(marathonClientConfiguration);
}
 
开发者ID:yammer,项目名称:breakerbox,代码行数:33,代码来源:BreakerboxServiceConfiguration.java


示例5: getLdapConfiguration

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
@JsonProperty("ldap")
public Optional<LdapConfiguration> getLdapConfiguration() {
    return ldapConfiguration;
}
 
开发者ID:guggens,项目名称:log-dropwizard-eureka-mongo-sample,代码行数:5,代码来源:BreakerboxServiceConfiguration.java


示例6: setLdapConfiguration

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
public void setLdapConfiguration(Optional<LdapConfiguration> ldapConfiguration) {
    this.ldapConfiguration = ldapConfiguration;
}
 
开发者ID:guggens,项目名称:log-dropwizard-eureka-mongo-sample,代码行数:4,代码来源:BreakerboxServiceConfiguration.java


示例7: getLdapConfiguration

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
public LdapConfiguration getLdapConfiguration() {
    return ldapConfiguration;
}
 
开发者ID:yammer,项目名称:backups,代码行数:4,代码来源:BackupConfiguration.java


示例8: setLdapConfiguration

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
public void setLdapConfiguration(LdapConfiguration ldapConfiguration) {
    this.ldapConfiguration = Optional.ofNullable(ldapConfiguration);
}
 
开发者ID:yammer,项目名称:breakerbox,代码行数:4,代码来源:BreakerboxServiceConfiguration.java


示例9: unhealthy

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
@Test
public void unhealthy() throws Exception {
    final LdapAuthenticator badLdapAuthenticator = new LdapCanAuthenticate(new LdapConfiguration());
    final LdapHealthCheck badHealthCheck = new LdapHealthCheck<>(new ResourceAuthenticator(badLdapAuthenticator));
    assertThat(badHealthCheck.check(), not(HealthCheck.Result.healthy()));
}
 
开发者ID:yammer,项目名称:dropwizard-auth-ldap,代码行数:7,代码来源:LdapHealthCheckTest.java


示例10: setup

import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
@BeforeClass
public static void setup() throws Exception {
    final LdapConfiguration configuration = new LdapConfiguration();
    ldapAuthenticator = new LdapAuthenticator(configuration);
}
 
开发者ID:yammer,项目名称:dropwizard-auth-ldap,代码行数:6,代码来源:LdapAuthenticatorTest.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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