<commit_before>/*
 * Copyright (C) 2013 StarTIC
 */
package com.bq.oss.lib.ws.auth.ioc;

import com.bq.oss.lib.token.ioc.TokenIoc;
import com.bq.oss.lib.token.parser.TokenParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;

import redis.clients.jedis.JedisPoolConfig;

import com.bq.oss.lib.ws.auth.AuthorizationInfo;
import com.bq.oss.lib.ws.auth.AuthorizationRequestFilter;
import com.bq.oss.lib.ws.auth.AuthorizationRulesService;
import com.bq.oss.lib.ws.auth.BearerTokenAuthenticator;
import com.bq.oss.lib.ws.auth.CookieOAuthProvider;
import com.bq.oss.lib.ws.auth.DefaultAuthorizationRulesService;
import com.bq.oss.lib.ws.auth.repository.AuthorizationRulesRepository;
import com.bq.oss.lib.ws.auth.repository.RedisAuthorizationRulesRepository;
import com.bq.oss.lib.ws.health.AuthorizationRedisHealthCheck;
import com.bq.oss.lib.ws.redis.GsonRedisSerializer;
import com.google.gson.JsonObject;
import com.sun.jersey.spi.container.ContainerRequestFilter;
import io.dropwizard.auth.Authenticator;
import io.dropwizard.auth.oauth.OAuthProvider;

/**
 * @author <NAME>
 * 
 */
@Configuration
@Import(TokenIoc.class)
public class AuthorizationIoc {

	private static final Logger LOG = LoggerFactory.getLogger(AuthorizationIoc.class);

	@Bean
	public AuthorizationRulesRepository getAuthorizationRulesRepository(RedisTemplate<String, JsonObject> redisTemplate) {
		return new RedisAuthorizationRulesRepository(redisTemplate);
	}

	@Bean<commit_msg>Refactor IOC imports.<commit_after>/*
 * Copyright (C) 2013 StarTIC
 */
package com.bq.oss.lib.ws.auth.ioc;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;

import redis.clients.jedis.JedisPoolConfig;

import com.bq.oss.lib.token.ioc.TokenIoc;
import com.bq.oss.lib.token.parser.TokenParser;
import com.bq.oss.lib.ws.auth.*;
import com.bq.oss.lib.ws.auth.repository.AuthorizationRulesRepository;
import com.bq.oss.lib.ws.auth.repository.RedisAuthorizationRulesRepository;
import com.bq.oss.lib.ws.health.AuthorizationRedisHealthCheck;
import com.bq.oss.lib.ws.redis.GsonRedisSerializer;
import com.google.gson.JsonObject;
import com.sun.jersey.spi.container.ContainerRequestFilter;

import io.dropwizard.auth.Authenticator;
import io.dropwizard.auth.oauth.OAuthProvider;

/**
 * @author <NAME>
 * 
 */
@Configuration
@Import(TokenIoc.class)
public class AuthorizationIoc {

	private static final Logger LOG = LoggerFactory.getLogger(AuthorizationIoc.class);

	@Bean
	public AuthorizationRulesRepository getAuthorizationRulesRepository(RedisTemplate<String, JsonObject> redisTemplate) {
		return new RedisAuthorizationRulesRepository(redisTemplate);
	}

	@Bean
{'fraction_non_alphanumeric': 0.10825478434732934, 'fraction_numerical': 0.003427592116538132, 'mean_word_length': 6.435244161358811, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3138867', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1120, 'n_words': 155}