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

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


      @Override
      protected Object doAction(Object... params) {
        String policyId = (String) params[0];
        String bucketId = (String) params[1];
        AuthIdsNoIdType authIds = (AuthIdsNoIdType) params[2];

        if(LOG.isDebugEnabled()) {
          LOG.debug("Add auths to policy:" + policyId + " on bucket:", bucketId);
        }
View Full Code Here


      @Override
      protected Object doAction(Object... params) {
        String policyId = (String) params[0];
        String bucketId = (String) params[1];
        AuthIdsNoIdType authIds = (AuthIdsNoIdType) params[2];

        if(LOG.isDebugEnabled()) {
          LOG.debug("Remove auths fromo policy:" + policyId + " on bucket:", bucketId);
        }

        for (String authId : authIds.getAuthIds())
        {
          dataManager.removeAuthFromBucket(policyId, bucketId, authId);
        }

        return new PolicyResponse(PolicyResponse.SUCCESS);
View Full Code Here

    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

  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

  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);       
View Full Code Here

    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);
View Full Code Here

    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);
View Full Code Here

    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);
View Full Code Here

TOP

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

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.