use of io.confluent.kafka.schemaregistry.client.security.bearerauth.BearerAuthCredentialProvider in project flink by apache.
the class CachedSchemaCoderProviderTest method testThatBearerAuthIsInitializedForBearerAuthProperties.
@Test
public void testThatBearerAuthIsInitializedForBearerAuthProperties() {
String token = "123456";
Map<String, String> configs = new HashMap<>();
configs.put("bearer.auth.credentials.source", "STATIC_TOKEN");
configs.put("bearer.auth.token", token);
CachedSchemaCoderProvider provider = initCachedSchemaCoderProvider(configs);
BearerAuthCredentialProvider bearerAuthCredentialProvider = getBearerAuthFromProvider(provider);
assertNotNull(bearerAuthCredentialProvider);
assertEquals(bearerAuthCredentialProvider.getBearerToken(null), token);
}
use of io.confluent.kafka.schemaregistry.client.security.bearerauth.BearerAuthCredentialProvider in project flink-mirror by flink-ci.
the class CachedSchemaCoderProviderTest method testThatBearerAuthIsInitializedForBearerAuthProperties.
@Test
public void testThatBearerAuthIsInitializedForBearerAuthProperties() {
String token = "123456";
Map<String, String> configs = new HashMap<>();
configs.put("bearer.auth.credentials.source", "STATIC_TOKEN");
configs.put("bearer.auth.token", token);
CachedSchemaCoderProvider provider = initCachedSchemaCoderProvider(configs);
BearerAuthCredentialProvider bearerAuthCredentialProvider = getBearerAuthFromProvider(provider);
assertNotNull(bearerAuthCredentialProvider);
assertEquals(bearerAuthCredentialProvider.getBearerToken(null), token);
}
use of io.confluent.kafka.schemaregistry.client.security.bearerauth.BearerAuthCredentialProvider in project flink-mirror by flink-ci.
the class CachedSchemaCoderProviderTest method testThatBearerAuthIsNotInitializedForNoBearerAuthProperties.
@Test
public void testThatBearerAuthIsNotInitializedForNoBearerAuthProperties() {
CachedSchemaCoderProvider provider = initCachedSchemaCoderProvider(new HashMap<>());
BearerAuthCredentialProvider bearerAuthCredentialProvider = getBearerAuthFromProvider(provider);
assertNull(bearerAuthCredentialProvider);
}
use of io.confluent.kafka.schemaregistry.client.security.bearerauth.BearerAuthCredentialProvider in project flink by splunk.
the class CachedSchemaCoderProviderTest method testThatBearerAuthIsNotInitializedForNoBearerAuthProperties.
@Test
public void testThatBearerAuthIsNotInitializedForNoBearerAuthProperties() {
CachedSchemaCoderProvider provider = initCachedSchemaCoderProvider(new HashMap<>());
BearerAuthCredentialProvider bearerAuthCredentialProvider = getBearerAuthFromProvider(provider);
assertNull(bearerAuthCredentialProvider);
}
use of io.confluent.kafka.schemaregistry.client.security.bearerauth.BearerAuthCredentialProvider in project flink by apache.
the class CachedSchemaCoderProviderTest method testThatBearerAuthIsNotInitializedForNoBearerAuthProperties.
@Test
public void testThatBearerAuthIsNotInitializedForNoBearerAuthProperties() {
CachedSchemaCoderProvider provider = initCachedSchemaCoderProvider(new HashMap<>());
BearerAuthCredentialProvider bearerAuthCredentialProvider = getBearerAuthFromProvider(provider);
assertNull(bearerAuthCredentialProvider);
}
Aggregations