Package io.fathom.cloud.openstack.client.identity.model

Examples of io.fathom.cloud.openstack.client.identity.model.V2AuthRequest$PasswordCredentials


        this.response = null;
    }

    public V2AuthResponse getResponse() throws RestClientException {
        if (this.response == null) {
            V2AuthRequest request = new V2AuthRequest();
            request.auth = new V2AuthRequest.V2AuthCredentials();
            request.auth.tenantName = project;

            V2AuthResponse responseChallenge = identityClient.doLogin(request, certificateAndKey);
View Full Code Here


        return null;
    }

    public static AuthTokenProvider build(OpenstackIdentityClient identityClient, String tenant, String username,
            String password) {
        V2AuthRequest request = new V2AuthRequest();
        request.auth = new V2AuthRequest.V2AuthCredentials();
        request.auth.tenantName = tenant;
        request.auth.passwordCredentials = new PasswordCredentials();
        request.auth.passwordCredentials.username = username;
        request.auth.passwordCredentials.password = password;
View Full Code Here

    // }

    @Test
    public void test() throws Exception {
        KeystoneAuthenticationClient client = new KeystoneAuthenticationClient();
        PasswordCredentials passwordCredentials = new PasswordCredentials();
        passwordCredentials.setUsername("user1");
        passwordCredentials.setPassword("secretuser1");

        String tenantId = null;
        client.authenticate(tenantId, passwordCredentials);
    }
View Full Code Here

  }

  @Override
  public PlatformlayerAuthenticationToken authenticateWithPassword(String username, String password)
      throws PlatformlayerAuthenticationClientException {
    PasswordCredentials passwordCredentials = new PasswordCredentials();
    passwordCredentials.setUsername(username);
    passwordCredentials.setPassword(password);

    // TODO: Cache auth tokens??
    AuthenticateResponse response = keystoneUserClient.authenticate(passwordCredentials);
    PlatformlayerAuthenticationToken authToken = new PlatformlayerAuthenticationToken(response.getAccess());
View Full Code Here

  }

  @Override
  public AuthenticationToken getAuthenticationToken() throws PlatformlayerAuthenticationClientException {
    if (token == null) {
      PasswordCredentials passwordCredentials = new PasswordCredentials();
      passwordCredentials.setUsername(username);
      passwordCredentials.setPassword(password);

      AuthenticateResponse response = client.authenticate(passwordCredentials);
      token = new PlatformlayerAuthenticationToken(response.getAccess());
    }
    return token;
View Full Code Here

TOP

Related Classes of io.fathom.cloud.openstack.client.identity.model.V2AuthRequest$PasswordCredentials

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.