Package com.alu.e3.prov.restapi.model

Examples of com.alu.e3.prov.restapi.model.ProvisionAuthentication


    api.setEndpoint(new Random().nextLong()+"");

    api.setStatus(Status.ACTIVE);


    ProvisionAuthentication pauth = new ProvisionAuthentication();
    Authkey authKey = new Authkey(); authKey.setKeyName("key");
    pauth.setAuthKey(authKey);

    api.setAuthentication(pauth);

    pauth.getAuths().add(AuthType.AUTHKEY);
    pauth.getAuths().add(AuthType.BASIC);
    pauth.getAuths().add(AuthType.IP_WHITE_LIST);


    TargetHost th = new TargetHost();
    th.setUrl("http://www.yahoo.com");
View Full Code Here


  @DirtiesContext
  public void testAuthKeySuccess() throws Exception {
    setup.whenAnyExchangeReceived(new Processor() {
      @Override
      public void process(Exchange exchange) throws Exception {
        ProvisionAuthentication auth = new ProvisionAuthentication();
        Authkey authKey = new Authkey();
        authKey.setKeyName("MyAuthkeyValue");
        auth.getAuths().add(AuthType.AUTHKEY);
        auth.setAuthKey(authKey);

        setupExchange(exchange, auth);
      }
    });
View Full Code Here

  @DirtiesContext
  public void testBasicSuccess() throws Exception {
    setup.whenAnyExchangeReceived(new Processor() {
      @Override
      public void process(Exchange exchange) throws Exception {
        ProvisionAuthentication auth = new ProvisionAuthentication();
        auth.getAuths().add(AuthType.BASIC);       

        setupExchange(exchange, auth);
      }
    });
View Full Code Here

  @DirtiesContext
  public void testIpListSuccess() throws Exception {
    setup.whenAnyExchangeReceived(new Processor() {
      @Override
      public void process(Exchange exchange) throws Exception {
        ProvisionAuthentication auth = new ProvisionAuthentication();
        auth.getAuths().add(AuthType.IP_WHITE_LIST);

        setupExchange(exchange, auth);
      }
    });
View Full Code Here

  @DirtiesContext
  public void testAllSuccess() throws Exception {
    setup.whenAnyExchangeReceived(new Processor() {
      @Override
      public void process(Exchange exchange) throws Exception {
        ProvisionAuthentication auth = new ProvisionAuthentication();
        Authkey authKey = new Authkey();
        authKey.setKeyName("MyAuthkeyValue");
        auth.setAuthKey(authKey);
        auth.getAuths().add(AuthType.IP_WHITE_LIST);
        auth.getAuths().add(AuthType.BASIC);       
        auth.getAuths().add(AuthType.AUTHKEY);       

        setupExchange(exchange, auth);
      }
    });
View Full Code Here

  @DirtiesContext
  public void testNoAuthSuccess() throws Exception {
    setup.whenAnyExchangeReceived(new Processor() {
      @Override
      public void process(Exchange exchange) throws Exception
        ProvisionAuthentication auth = new ProvisionAuthentication();
        auth.getAuths().add(AuthType.NO_AUTH);
        setupExchange(exchange, auth);
      }
    });

    testMessage.setExpectedMessageCount(1);
View Full Code Here

    api.setVersion("1.0");
    api.setEndpoint("AEndpointURL");

    api.setStatus(Status.ACTIVE);

    ProvisionAuthentication pauth = new ProvisionAuthentication();
    Authkey authKey = new Authkey();
    authKey.setKeyName("key");
    pauth.setAuthKey(authKey);

    api.setAuthentication(pauth);

    pauth.getAuths().add(AuthType.AUTHKEY);
    pauth.getAuths().add(AuthType.BASIC);
    pauth.getAuths().add(AuthType.IP_WHITE_LIST);

    TargetHost th = new TargetHost();
    th.setUrl("http://www.yahoo.com");

    TargetHost th2 = new TargetHost();
View Full Code Here

    exchange.setProperty(ExchangeConstantKeys.E3_REQUEST_PAYLOAD.toString(), api);
    exchange.setProperty(ExchangeConstantKeys.E3_API_ID.toString(), "MyApiID");
    exchange.setProperty(ExchangeConstantKeys.E3_API_ID_ENCODED.toString(), "MonApiIDEncoded");
    exchange.setProperty(ExchangeConstantKeys.E3_PROVISION_ID.toString(), "MyProvId");

    ProvisionAuthentication auth = new ProvisionAuthentication();
    Authkey authKey = new Authkey();
    authKey.setKeyName("MyAuthkeyValue");
    auth.getAuths().add(AuthType.AUTHKEY);
    auth.setAuthKey(authKey);

    HTTPSType httpsType = new HTTPSType();
    httpsType.setEnabled(https);
    httpsType.setTlsMode(TLSMode.ONE_WAY);
    api.setHttps(httpsType);
View Full Code Here

    return mSchema;
  }

  private static final com.alu.e3.prov.restapi.model.ResourceItem fromDataModel(com.alu.e3.data.model.sub.ResourceItem item) {

    ResourceItem wsItem = new ResourceItem();
    wsItem.setName(item.getName());
    wsItem.setGrammar(item.getGrammar());
    wsItem.setIsMain(item.isIsMain());   

    return wsItem;
  }
View Full Code Here

  }

  public static final SSLCert fromDataModel(Certificate cert){
    if(cert == null) throw new IllegalArgumentException("cert must not be null");

    SSLCert sslCert = new SSLCert();
    sslCert.setDisplayName(cert.getCertDetail().getName());
    sslCert.setContent(cert.getData());
    sslCert.setId(cert.getId());
    sslCert.setKeyId(cert.getCertDetail().getKeyId());

    return sslCert;
  }
View Full Code Here

TOP

Related Classes of com.alu.e3.prov.restapi.model.ProvisionAuthentication

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.