Package com.alu.e3.auth.camel.endpoint

Examples of com.alu.e3.auth.camel.endpoint.AuthEndpoint


    return s;
  }

  private static final AuthKeyAuth fromDataModelToAuthKeyAuth(AuthDetail authDetail) {
    if (authDetail==null) throw new IllegalArgumentException("authDetail must not be null");
    AuthKeyAuth a = new AuthKeyAuth();
    a.setKeyValue  (authDetail.getAuthKeyValue());
    return a;
  }
View Full Code Here


    return th;
  }

  private static final Authentication fromDataModel(SBAuthentication authentication) {
    if (authentication==null) return null; // throw new IllegalArgumentException("authentication must not be null");
    Authentication a = new Authentication();
    a.setType  (authentication.getType());
    a.setData  (fromDataModelToData(authentication.getKeys()));
    return a;
  }
View Full Code Here

  }

  private static final ProvisionAuthentication fromDataModelToProvisionAuthentication(ApiDetail apiDetail) {
    if (apiDetail==null) throw new IllegalArgumentException("apiDetail must not be null");

    Authkey ak = new Authkey();
    ak.setKeyName    (apiDetail.getAuthKeyName());
    ak.setHeaderName  (apiDetail.getAuthHeaderName());

    ProvisionAuthentication p = new ProvisionAuthentication();
    p.setAuthKey    (ak);
    p.getAuths().addAll  (BeanConverterUtil.<AuthType, NBAuthType>fromDataModels(apiDetail.getEnabledAuthType()));
View Full Code Here

    return a;
  }

  private static BasicAuth fromDataModelToBasicAuth(AuthDetail authDetail) {
    if (authDetail==null) throw new IllegalArgumentException("authDetail must not be null");
    BasicAuth b = new BasicAuth();
    b.setUsername  (authDetail.getUsername());
    b.setPassword  (authDetail.getPassword());
    return b;
  }
View Full Code Here

    return a;
  }

  private static final Data fromDataModelToData(Map<String, String> keys) {
    if (keys==null) throw new IllegalArgumentException("keys must not be null");
    Data d = new Data();
    for(Map.Entry<String, String> entry : keys.entrySet()) {
      Key k = new Key();
      k.setName  (entry.getKey());
      k.setValue  (entry.getValue());
      d.getKey().add(k);
    }
    return d;
  }
View Full Code Here

    TargetHost th2 = new TargetHost();
    th2.setUrl("http://www.google.com");

    Authentication auth = new Authentication();
    auth.setType("NoAuth");
    Data d = new Data();
    Key k = new Key();
    k.setName("aKey00");
    k.setValue("key000Val");
    d.setKey(Arrays.asList(k));
    auth.setData(d);
    th.setAuthentication(auth);
    th2.setAuthentication(auth);

    env.setTargetHosts(Arrays.asList(th, th2));
View Full Code Here

  }

  private static final DynamicTdr fromDataModel(TdrDynamicRule tdrDynamicRule) {
    if (tdrDynamicRule==null) throw new IllegalArgumentException("tdrDynamicRule must not be null");

    DynamicTdr s = new DynamicTdr();
    s.setHttpHeaderName      (tdrDynamicRule.getHttpHeaderName());
    s.setTdrPropName      (tdrDynamicRule.getTdrPropName());
    s.setExtractFrom      (tdrDynamicRule.getExtractFrom());

    TdrType tdrType = new TdrType();
    s.setTypes          (tdrType);
    tdrType.getType().addAll  (tdrDynamicRule.getTypes());

    return s;
  }
View Full Code Here

    return b;
  }

  private static IpWhiteList fromDataModelToIpWhiteListAuth(AuthDetail authDetail) {
    if (authDetail==null) throw new IllegalArgumentException("authDetail must not be null");
    IpWhiteList i = new IpWhiteList();
    i.getIp().addAll  (authDetail.getWhiteListedIps());
    return i;
  }
View Full Code Here

    return i;
  }

  private static IpWhiteList fromDataModelToIpWhiteListApi(Api apiDetail) {
    if (apiDetail==null) throw new IllegalArgumentException("apiDetail must not be null");
    IpWhiteList i = new IpWhiteList();
    i.getIp().addAll  (apiDetail.getWhiteListedIps());
    return i;
  }
View Full Code Here

    provisionData.setTdrOnLimitReached    (api.getTdrOnLimitReached());
    provisionData.setStatus          (fromDataModel(api.getApiDetail().getStatus()));
    provisionData.setHttps          (fromDataModel(api.getApiDetail().getHttps()));

    for(String keyname : api.getProperties().keySet()){
      Key k = new Key();
      k.setName(keyname);
      k.setValue(api.getProperties().get(keyname));
      provisionData.getProperties().add(k);
    }

    provisionData.setHeaderTransformations  (BeanConverterUtil.<com.alu.e3.prov.restapi.model.HeaderTransformation,HeaderTransformation>fromDataModels(api.getHeaderTransformations()));
View Full Code Here

TOP

Related Classes of com.alu.e3.auth.camel.endpoint.AuthEndpoint

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.