コード例 #1
0
ファイル: TestsController.cs プロジェクト: tiger2soft/osharp
        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.AddClientSecret(secretDto);

            return(Content(result.Message));
        }
コード例 #2
0
ファイル: TestsController.cs プロジェクト: donnieyoung/osharp
 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.AddClientSecret(secretDto);
     return Content(result.Message);
 }