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

Examples of io.fathom.cloud.openstack.client.identity.model.V2AuthResponse


        if (this.response == null) {
            V2AuthRequest request = new V2AuthRequest();
            request.auth = new V2AuthRequest.V2AuthCredentials();
            request.auth.tenantName = project;

            V2AuthResponse responseChallenge = identityClient.doLogin(request, certificateAndKey);

            String challenge = responseChallenge.challenge;
            V2AuthRequest.ChallengeResponse challengeResponse = ChallengeResponses.respondToAuthChallenge(
                    certificateAndKey, challenge);

            request.auth.challengeResponse = challengeResponse;

            V2AuthResponse response = identityClient.doLogin(request, certificateAndKey);

            this.response = response;
        }
        return this.response;
    }
View Full Code Here


        return this.response;
    }

    @Override
    public String findEndpoint(String type) throws RestClientException {
        V2AuthResponse response = getResponse();
        if (response.access != null && response.access.serviceCatalog != null) {
            for (V2AuthResponse.Service service : response.access.serviceCatalog) {
                if (!service.type.equals(type)) {
                    continue;
                }
View Full Code Here

        return new CertificateAuthTokenProvider(identityClient, project, certificateAndKey);
    }

    @Override
    public String getToken() throws RestClientException {
        V2AuthResponse response = getResponse();

        if (response == null || response.access == null || response.access.token == null) {
            log.warn("Unable to get auth token");
            return null;
        }
View Full Code Here

        return this.response;
    }

    @Override
    public String findEndpoint(String type) throws RestClientException {
        V2AuthResponse response = getResponse();
        if (response.access != null && response.access.serviceCatalog != null) {
            for (V2AuthResponse.Service service : response.access.serviceCatalog) {
                if (!service.type.equals(type)) {
                    continue;
                }
View Full Code Here

    // return build(identityClient, tenant, username, password);
    // }

    @Override
    public String getToken() throws RestClientException {
        V2AuthResponse response = getResponse();

        return response.access.token.id;
    }
View Full Code Here

TOP

Related Classes of io.fathom.cloud.openstack.client.identity.model.V2AuthResponse

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.