public async Task <TokenIssueResponse> IssueToken(TokenIssueRequest request)
        {
            // Login to CaaS
            IAccount account = await _computeClient.LoginAsync(
                new NetworkCredential(
                    request.Message.Credentials.UserName,
                    request.Message.Credentials.Password));

            // Get available clouds
            IEnumerable <DatacenterWithMaintenanceStatusType> dataCenters =
                await _computeClient.GetDataCentersWithMaintenanceStatuses();

            string loginToken = request.Message.Credentials.UserName + ":" + request.Message.Credentials.Password;

            byte[] buffer            = new byte[loginToken.Length];
            string loginTokenEncoded = Convert.ToBase64String(Encoding.UTF8.GetBytes(loginToken));

            List <Endpoint> endPoints = new List <Endpoint>();

            endPoints.Add(new Endpoint()
            {
                Url         = ConfigurationHelpers.GetTenantUrl(Request.RequestUri.Host, request.Message.TenantName),
                Id          = "AU1",                // TODO: Map to cloud id?
                InternalURL = ConfigurationHelpers.GetTenantUrl(Request.RequestUri.Host, request.Message.TenantName),
                PublicURL   = ConfigurationHelpers.GetTenantUrl(Request.RequestUri.Host, request.Message.TenantName),
                Region      = "RegionOne"
            });
            foreach (var dataCenter in dataCenters)
            {
                endPoints.Add(new Endpoint()
                {
                    Url         = ConfigurationHelpers.GetTenantUrl(Request.RequestUri.Host, request.Message.TenantName),
                    Id          = dataCenter.location,            // TODO: Map to cloud id?
                    InternalURL = ConfigurationHelpers.GetTenantUrl(Request.RequestUri.Host, request.Message.TenantName),
                    PublicURL   = ConfigurationHelpers.GetTenantUrl(Request.RequestUri.Host, request.Message.TenantName),
                    Region      = "Dimension Data " + dataCenter.displayName
                });
            }

            TokenIssueResponse response = new TokenIssueResponse()
            {
                AccessToken = new AccessToken()
                {
                    Token   = new Token(request.Message.TenantName, request.Message.TenantName, loginTokenEncoded),
                    Catalog = new ServiceCatalogEntry[]
                    {
                        new ServiceCatalogEntry()
                        {
                            Endpoints      = endPoints.ToArray(),
                            EndpointsLinks = new string[]
                            {
                                ConfigurationHelpers.GetTenantUrl(Request.RequestUri.Host, request.Message.TenantName)
                            },
                            Name = "nova",
                            Type = EndpointType.compute
                        },
                        new ServiceCatalogEntry()
                        {
                            Endpoints      = endPoints.ToArray(),
                            EndpointsLinks = new string[]
                            {
                                ConfigurationHelpers.GetTenantUrl(Request.RequestUri.Host, request.Message.TenantName)
                            },
                            Name = "keystone",
                            Type = EndpointType.identity
                        }
                    },
                    User = new User()
                    {
                        Id         = Guid.NewGuid().ToString(),
                        Name       = account.FullName,
                        Roles      = new User.Role[] { },
                        RolesLinks = new string[] {},
                        UserName   = request.Message.Credentials.UserName
                    }
                }
            };

            return(response);
        }