Package com.alu.e3.auth.camel.component

Examples of com.alu.e3.auth.camel.component.AuthComponent


 
  private AuthComponent component;
 
  @Before
  public void before(){
    component = new AuthComponent(new DefaultCamelContext());
    component.registerExecutorFactory("authKey", new MockAppKeyExecutorFactory());
    component.registerExecutorFactory("basic", new MockHttpBasicExecutorFactory());
    component.registerExecutorFactory("ipList", new MockIpWhitelistExecutorFactory());
    component.registerExecutorFactory("noAuth", new MockNoAuthExecutorFactory());
  }
View Full Code Here


 
  @Before
  public void before(){
    MockDataManager dataManager = new MockDataManager();
   
    component = new AuthComponent(new DefaultCamelContext());
    component.setDataManager(dataManager);
    component.registerExecutorFactory("authKey", new MockAppKeyExecutorFactory());
    component.registerExecutorFactory("basic", new MockHttpBasicExecutorFactory());
    component.registerExecutorFactory("ipList", new MockIpWhitelistExecutorFactory());
    component.registerExecutorFactory("noAuth", new MockNoAuthExecutorFactory());
View Full Code Here

          LOG.debug("Getting Policy:", policyId);
        }

        com.alu.e3.data.model.Policy policyDataModel = dataManager.getPolicyById(policyId);
        if(policyDataModel == null)
          throw new InvalidIDException("A Policy with that ID does not exist");

        Policy policy = BeanConverterUtil.fromDataModel(policyDataModel);

        PolicyResponse response = new PolicyResponse(PolicyResponse.SUCCESS);
        response.setPolicy(policy);
View Full Code Here

*/
public class PropertyExtractionProcessor implements Processor {

  @Override
  public void process(Exchange exchange) throws Exception {
    AuthIdentity identity = (AuthIdentity) exchange.getProperty(ExchangeConstantKeys.E3_AUTH_IDENTITY.toString());
    Map<String, String> props = resolveProperties(identity);

    exchange.setProperty(ExchangeConstantKeys.E3_MODEL_PROPERTIES.toString(), props);
  }
View Full Code Here

  @Override
  public void process(Exchange exchange) throws Exception {

    // Get current AuthIdentity
    AuthIdentity authIdentity = exchange.getProperty( ExchangeConstantKeys.E3_AUTH_IDENTITY.toString(), AuthIdentity.class);

    // extracts subscriber id and checks authorization
    String subscriberId = extractSubscriberId(exchange);
    if (null == subscriberId) return ;
View Full Code Here

public class SubscriberIDGenerator implements Processor {
 
  @Override
  public void process(Exchange exchange) throws Exception {

    AuthIdentity authIdentity = exchange.getProperty(ExchangeConstantKeys.E3_AUTH_IDENTITY.toString(), AuthIdentity.class);
   
    String subscriberId = null;
   
    //TODO: Check if It's what we need as subscriberID
    if (authIdentity == null || authIdentity.getAuth() == null || authIdentity.getApi() == null)
      subscriberId = UUID.randomUUID().toString();
    else
      // Align subscriberId format with SubscriberIdExtractor processor!
      subscriberId = new StringBuilder(authIdentity.getApi().getId()).append("|").append(authIdentity.getAuth().getId()).toString();
   
    exchange.getIn().setHeader(E3Constant.SUBSCRIBER_ID_HEADER_NAME, subscriberId);
  }
View Full Code Here

  private int queueWaitingSize = 2000; // Only default

  private static PerfWatch perfWatch;
  public PerfWatch getPerfWatch() {
    if (perfWatch == null )
      perfWatch = new PerfWatch();
   
    return perfWatch;
  }
View Full Code Here

  private static final int TDR_FILE_AGE = 30 * 1000;   // TDR file age rotation trigger

  private static PerfWatch perfWatch;
  public PerfWatch getPerfWatch() {
    if (perfWatch == null )
      perfWatch = new PerfWatch();
   
    return perfWatch;
  }
View Full Code Here

  private static Logger logger = Logger.getLogger(TDRResponseProcessor.class);

  private static PerfWatch perfWatch;
  public PerfWatch getPerfWatch() {
    if (perfWatch == null )
      perfWatch = new PerfWatch();
   
    return perfWatch;
  }
View Full Code Here

  private static String TDR_RES_PROC_RUN_KEY = "TDR_RES_PROC_RUN";
 
  private static PerfWatch perfWatch;
  public PerfWatch getPerfWatch() {
    if (perfWatch == null )
      perfWatch = new PerfWatch();
   
    return perfWatch;
  }
View Full Code Here

TOP

Related Classes of com.alu.e3.auth.camel.component.AuthComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.