Exemplo n.º 1
0
        public async Task <ActionResult> Test1()
        {
            ClientStore     clientStore = ServiceProvider.GetService <ClientStore>();
            OperationResult result      = null;
            //ClientInputDto clientDto = new ClientInputDto()
            //{
            //    Name = "测试客户端01",
            //    ClientType = ClientType.Application,
            //    Url = "http://localhost:10240",
            //    LogoUrl = "http://localhost:10240",
            //    RedirectUrl = "http://localhost:10240"
            //};
            //result = await clientStore.AddClient(clientDto);
            ClientSecretInputDto secretDto = new ClientSecretInputDto()
            {
                Type     = "Test Type",
                Remark   = "Remark",
                ClientId = 2
            };

            result = await clientStore.CreateClientSecret(secretDto);

            return(Content(result.Message));
        }