public async Task <RestApiEndpoint> GetServiceHealthEndpointAsync()
        {
            var url      = $"{_serverEndpoint}/api/{Version}/health";
            var audience = $"{_audienceBaseUrl}/api/{Version}/health";
            var token    = await _restApiAccessTokenGenerator.Generate(audience);

            return(new RestApiEndpoint(url, token));
        }
        public async Task <RestApiEndpoint> GetServiceHealthEndpointAsync()
        {
            var port     = _port == null ? "" : $":{_port}";
            var url      = $"{_baseEndpoint}{port}/api/{Version}/health";
            var audience = $"{_baseEndpoint}/api/{Version}/health";
            var token    = await _restApiAccessTokenGenerator.Generate(audience);

            return(new RestApiEndpoint(url, token));
        }
Exemple #3
0
        private RestApiEndpoint GenerateRestApiEndpoint(string path, TimeSpan?lifetime = null)
        {
            var token = _restApiAccessTokenGenerator.Generate($"{_audiencePrefix}{path}", lifetime);

            return(new RestApiEndpoint($"{_requestPrefix}{path}", token));
        }
        private RestApiEndpoint GenerateRestApiEndpoint(string api, TimeSpan?lifetime = null)
        {
            var token = _restApiAccessTokenGenerator.Generate(api, lifetime);

            return(new RestApiEndpoint(api, token));
        }