Search in sources :

Example 1 with AmazonDynamoDbClientFactory

use of org.apereo.cas.dynamodb.AmazonDynamoDbClientFactory in project cas by apereo.

the class DynamoDbTicketRegistryConfiguration method amazonDynamoDbClient.

@RefreshScope
@Bean
@SneakyThrows
public AmazonDynamoDB amazonDynamoDbClient() {
    final DynamoDbTicketRegistryProperties dynamoDbProperties = casProperties.getTicket().getRegistry().getDynamoDb();
    final AmazonDynamoDbClientFactory factory = new AmazonDynamoDbClientFactory();
    return factory.createAmazonDynamoDb(dynamoDbProperties);
}
Also used : AmazonDynamoDbClientFactory(org.apereo.cas.dynamodb.AmazonDynamoDbClientFactory) DynamoDbTicketRegistryProperties(org.apereo.cas.configuration.model.support.dynamodb.DynamoDbTicketRegistryProperties) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) SneakyThrows(lombok.SneakyThrows) Bean(org.springframework.context.annotation.Bean)

Example 2 with AmazonDynamoDbClientFactory

use of org.apereo.cas.dynamodb.AmazonDynamoDbClientFactory in project cas by apereo.

the class DynamoDbServiceRegistryConfiguration method amazonDynamoDbClient.

@RefreshScope
@Bean
@SneakyThrows
public AmazonDynamoDB amazonDynamoDbClient() {
    final DynamoDbServiceRegistryProperties dynamoDbProperties = casProperties.getServiceRegistry().getDynamoDb();
    final AmazonDynamoDbClientFactory factory = new AmazonDynamoDbClientFactory();
    return factory.createAmazonDynamoDb(dynamoDbProperties);
}
Also used : DynamoDbServiceRegistryProperties(org.apereo.cas.configuration.model.support.dynamodb.DynamoDbServiceRegistryProperties) AmazonDynamoDbClientFactory(org.apereo.cas.dynamodb.AmazonDynamoDbClientFactory) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) SneakyThrows(lombok.SneakyThrows) Bean(org.springframework.context.annotation.Bean)

Aggregations

SneakyThrows (lombok.SneakyThrows)2 AmazonDynamoDbClientFactory (org.apereo.cas.dynamodb.AmazonDynamoDbClientFactory)2 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)2 Bean (org.springframework.context.annotation.Bean)2 DynamoDbServiceRegistryProperties (org.apereo.cas.configuration.model.support.dynamodb.DynamoDbServiceRegistryProperties)1 DynamoDbTicketRegistryProperties (org.apereo.cas.configuration.model.support.dynamodb.DynamoDbTicketRegistryProperties)1