Examples of SessionCredentials


Examples of com.alibaba.rocketmq.common.SessionCredentials

        System.setProperty(RemotingCommand.RemotingVersionKey, Integer.toString(MQVersion.CurrentVersion));
    }


    private void attachSessionCredentials(final RemotingCommand cmd) {
        SessionCredentials tmp = this.sessionCredentials;
        if (tmp != null) {
            if (tmp.getAccessKey() != null && tmp.getSecretKey() != null) {
                HashMap<String, String> extFields = new HashMap<String, String>();
                extFields.put(SessionCredentials.AccessKey, tmp.getAccessKey());
                cmd.setExtFields(extFields);
            }
        }
    }
View Full Code Here

Examples of com.alibaba.rocketmq.common.SessionCredentials

        }
    }


    private void attachSessionCredentials(final RemotingCommand cmd) {
        SessionCredentials tmp = this.sessionCredentials;
        if (tmp != null) {
            if (tmp.getAccessKey() != null && tmp.getSecretKey() != null) {
                HashMap<String, String> extFields = new HashMap<String, String>();
                extFields.put(SessionCredentials.AccessKey, tmp.getAccessKey());
                cmd.setExtFields(extFields);
            }
        }
    }
View Full Code Here

Examples of com.alibaba.rocketmq.common.SessionCredentials

        System.setProperty(RemotingCommand.RemotingVersionKey, Integer.toString(MQVersion.CurrentVersion));
    }


    private void attachSessionCredentials(final RemotingCommand cmd) {
        SessionCredentials tmp = this.sessionCredentials;
        if (tmp != null) {
            if (tmp.getAccessKey() != null && tmp.getSecretKey() != null) {
                HashMap<String, String> extFields = new HashMap<String, String>();
                extFields.put(SessionCredentials.AccessKey, tmp.getAccessKey());
                cmd.setExtFields(extFields);
            }
        }
    }
View Full Code Here

Examples of com.alibaba.rocketmq.common.SessionCredentials

        }
    }


    private void attachSessionCredentials(final RemotingCommand cmd) {
        SessionCredentials tmp = this.sessionCredentials;
        if (tmp != null) {
            if (tmp.getAccessKey() != null && tmp.getSecretKey() != null) {
                HashMap<String, String> extFields = new HashMap<String, String>();
                extFields.put(SessionCredentials.AccessKey, tmp.getAccessKey());
                cmd.setExtFields(extFields);
            }
        }
    }
View Full Code Here

Examples of com.dyn.client.v3.traffic.domain.SessionCredentials

      checkNotNull(zone.getVersion()"Version cannot be null for a Session.");
   }

   @Test
   protected void testCreateSession() {
      SessionCredentials credentials = SessionCredentials.builder()
                                                         .customerName(identity.substring(0, identity.indexOf(':')))
                                                         .userName(identity.substring(identity.indexOf(':') + 1))
                                                         .password(credential).build();
      session = api().login(credentials);
      checkSession(session);
View Full Code Here

Examples of org.jclouds.aws.domain.SessionCredentials

public class SessionCredentialsHandlerTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/credentials.xml");

      SessionCredentials expected = expected();

      SessionCredentialsHandler handler = injector.getInstance(SessionCredentialsHandler.class);
      SessionCredentials result = factory.create(handler).parse(is);

      assertEquals(result, expected);
      assertEquals(result.getAccessKeyId(), expected.getAccessKeyId());
      assertEquals(result.getSecretAccessKey(), expected.getSecretAccessKey());
      assertEquals(result.getSessionToken(), expected.getSessionToken());
      assertEquals(result.getExpiration(), expected.getExpiration());
   }
View Full Code Here

Examples of org.jclouds.aws.domain.SessionCredentials

@Test(groups = "live", singleThreaded = true, testName = "STSApiLiveTest")
public class STSApiLiveTest extends BaseSTSApiLiveTest {

   @Test
   protected void testCreateTemporaryCredentials() {
      SessionCredentials creds = api.createTemporaryCredentials(
            new SessionCredentialsOptions().durationSeconds(MINUTES.toSeconds(15)));
      checkTemporaryCredentials(creds);
      // TODO: actually login to some service
      //
      //      context.close();
View Full Code Here

Examples of org.jclouds.aws.domain.SessionCredentials

public class GetSessionTokenResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/session_token.xml");

      SessionCredentials expected = expected();

      SessionCredentialsHandler handler = injector.getInstance(SessionCredentialsHandler.class);
      SessionCredentials result = factory.create(handler).parse(is);

      assertEquals(result, expected);
      assertEquals(result.getAccessKeyId(), expected.getAccessKeyId());
      assertEquals(result.getSecretAccessKey(), expected.getSecretAccessKey());
      assertEquals(result.getSessionToken(), expected.getSessionToken());
      assertEquals(result.getExpiration(), expected.getExpiration());
   }
View Full Code Here

Examples of org.jclouds.aws.domain.SessionCredentials

public class SessionCredentialsHandlerTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/credentials.xml");

      SessionCredentials expected = expected();

      SessionCredentialsHandler handler = injector.getInstance(SessionCredentialsHandler.class);
      SessionCredentials result = factory.create(handler).parse(is);

      assertEquals(result, expected);
      assertEquals(result.getAccessKeyId(), expected.getAccessKeyId());
      assertEquals(result.getSecretAccessKey(), expected.getSecretAccessKey());
      assertEquals(result.getSessionToken(), expected.getSessionToken());
      assertEquals(result.getExpiration(), expected.getExpiration());
   }
View Full Code Here

Examples of org.jclouds.aws.domain.SessionCredentials

public class SessionCredentialsHandlerTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/credentials.xml");

      SessionCredentials expected = expected();

      SessionCredentialsHandler handler = injector.getInstance(SessionCredentialsHandler.class);
      SessionCredentials result = factory.create(handler).parse(is);

      assertEquals(result, expected);
      assertEquals(result.getAccessKeyId(), expected.getAccessKeyId());
      assertEquals(result.getSecretAccessKey(), expected.getSecretAccessKey());
      assertEquals(result.getSessionToken(), expected.getSessionToken());
      assertEquals(result.getExpiration(), expected.getExpiration());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.