示例#1
0
        public async Task <IViewComponentResult> InvokeAsync(string id)
        {
            string sourceId = id;

            if (string.IsNullOrWhiteSpace(sourceId))
            {
                sourceId = _discoverCacheContainerFactory.GetAll().Keys.FirstOrDefault();
            }

            var discoveryResponse = await _discoverCacheContainerFactory.Get(sourceId).DiscoveryCache.GetAsync();

            var model = new IdentitySourceViewComponentModel()
            {
                SchemeId          = sourceId,
                DiscoveryResponse = discoveryResponse
            };

            return(View(model));
        }
示例#2
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var sources = _discoverCacheContainerFactory.GetAll();

            return(View(sources));
        }