本文整理汇总了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"));
}
示例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));
}
示例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);
}
示例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;
}
示例8: setLdapConfiguration
import com.yammer.dropwizard.authenticator.LdapConfiguration; //导入依赖的package包/类
public void setLdapConfiguration(LdapConfiguration ldapConfiguration) {
this.ldapConfiguration = Optional.ofNullable(ldapConfiguration);
}
示例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()));
}
示例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);
}