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

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


        if (service.endpoints == null) {
            service.endpoints = Lists.newArrayList();
        }

        for (String interfaceName : new String[] { "public", "internal", "admin" }) {
            Endpoint endpoint = new Endpoint();
            service.endpoints.add(endpoint);

            endpoint.id = service.id + "-" + interfaceName;
            endpoint.name = service.name;
            endpoint.interfaceName = interfaceName;
View Full Code Here


        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

            setService(svc.getName());
        } else {
            throw new DeploymentException(
                            "If service is not set, the WSDL must contain a single service definition");
        }
        Endpoint endpoint;
        if (getEndpoint() != null) {
            endpoint = svc.getEndpoint(new NCName(getEndpoint()));
            if (endpoint == null) {
                throw new DeploymentException("Cound not find endpoint '" + getEndpoint()
                                + "' in wsdl for service '" + getService() + "'");
            }
        } else if (svc.getEndpoints().length == 1) {
            endpoint = svc.getEndpoints()[0];
            setEndpoint(endpoint.getName().toString());
        } else {
            throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService()
                            + "' must contain a single port definition");
        }
        marshaler.setBinding(BindingFactory.createBinding(endpoint));
View Full Code Here

            svc = desc.getServices()[0];
            setService(svc.getName());
        } else {
            throw new DeploymentException("If service is not set, the WSDL must contain a single service definition");
        }
        Endpoint endpoint;
        if (getEndpoint() != null) {
            endpoint = svc.getEndpoint(new NCName(getEndpoint()));
            if (endpoint == null) {
                throw new DeploymentException("Cound not find endpoint '" + getEndpoint() + "' in wsdl for service '" + getService() + "'");
            }
        } else if (svc.getEndpoints().length == 1) {
            endpoint = svc.getEndpoints()[0];
            setEndpoint(endpoint.getName().toString());
        } else {
            throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService() + "' "
                                             + "must contain a single port definition");
        }
        marshaler.setBinding(BindingFactory.createBinding(endpoint));
View Full Code Here

        try {
            String url = PersonHttpTest.class.getResource(wsdlResource).toString();
            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
            DescriptionElement descElement = reader.readWSDL(url);
            Description desc = descElement.toComponent();
            Endpoint endpoint = desc.getServices()[0].getEndpoints()[0];
            Binding<?> binding = BindingFactory.createBinding(endpoint);
            assertNotNull(binding);
            return binding;
        } catch (WSDLException e) {
            throw new RuntimeException(e);
View Full Code Here

            svc = desc.getServices()[0];
            setService(svc.getName());
        } else {
            throw new DeploymentException("If service is not set, the WSDL must contain a single service definition");
        }
        Endpoint endpoint;
        if (getEndpoint() != null) {
            endpoint = svc.getEndpoint(new NCName(getEndpoint()));
            if (endpoint == null) {
                throw new DeploymentException("Cound not find endpoint '" + getEndpoint() + "' in wsdl for service '" + getService() + "'");
            }
        } else if (svc.getEndpoints().length == 1) {
            endpoint = svc.getEndpoints()[0];
            setEndpoint(endpoint.getName().toString());
        } else {
            throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService() + "' "
                                             + "must contain a single port definition");
        }
        marshaler.setBinding(BindingFactory.createBinding(endpoint));
View Full Code Here

TOP

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

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.