|
|
|
@ -10,7 +10,6 @@ using Volo.Abp.Application.Dtos; |
|
|
|
namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
{ |
|
|
|
[Route("IdentityServer/Client")] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Default)] |
|
|
|
public class ClientController : ProjectNameController, IIdentityServerClientAppService |
|
|
|
{ |
|
|
|
private readonly IIdentityServerClientAppService _identityServerClientAppService; |
|
|
|
@ -22,7 +21,8 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("page")] |
|
|
|
[SwaggerOperation(summary: "分页获取Client信息", Tags = new[] { "Client" })] |
|
|
|
public Task<PagedResultDto<PagingClientListOutput>> GetListAsync(PagingClientListInput input) |
|
|
|
public Task<PagedResultDto<PagingClientListOutput>> GetListAsync( |
|
|
|
PagingClientListInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.GetListAsync(input); |
|
|
|
} |
|
|
|
@ -30,7 +30,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("create")] |
|
|
|
[SwaggerOperation(summary: "创建Client", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Create)] |
|
|
|
public Task CreateAsync(CreateClientInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.CreateAsync(input); |
|
|
|
@ -38,7 +37,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("delete")] |
|
|
|
[SwaggerOperation(summary: "删除client", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Delete)] |
|
|
|
public Task DeleteAsync(IdInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.DeleteAsync(input); |
|
|
|
@ -46,7 +44,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("updateBasic")] |
|
|
|
[SwaggerOperation(summary: "更新基本信息", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Update)] |
|
|
|
public Task UpdateBasicDataAsync(UpdataBasicDataInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.UpdateBasicDataAsync(input); |
|
|
|
@ -54,7 +51,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("updateScopes")] |
|
|
|
[SwaggerOperation(summary: "更新client scopes", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Update)] |
|
|
|
public Task UpdateScopesAsync(UpdateScopeInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.UpdateScopesAsync(input); |
|
|
|
@ -62,7 +58,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("addRedirectUri")] |
|
|
|
[SwaggerOperation(summary: "新增回调地址", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Update)] |
|
|
|
public Task AddRedirectUriAsync(AddRedirectUriInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.AddRedirectUriAsync(input); |
|
|
|
@ -70,7 +65,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("removeRedirectUri")] |
|
|
|
[SwaggerOperation(summary: "删除回调地址", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Update)] |
|
|
|
public Task RemoveRedirectUriAsync(RemoveRedirectUriInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.RemoveRedirectUriAsync(input); |
|
|
|
@ -78,7 +72,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("addLogoutRedirectUri")] |
|
|
|
[SwaggerOperation(summary: "新增Logout回调地址", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Update)] |
|
|
|
public Task AddLogoutRedirectUriAsync(AddRedirectUriInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.AddLogoutRedirectUriAsync(input); |
|
|
|
@ -86,7 +79,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("removeLogoutRedirectUri")] |
|
|
|
[SwaggerOperation(summary: "删除Logout回调地址", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Update)] |
|
|
|
public Task RemoveLogoutRedirectUriAsync(RemoveRedirectUriInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.RemoveLogoutRedirectUriAsync(input); |
|
|
|
@ -94,7 +86,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("addCors")] |
|
|
|
[SwaggerOperation(summary: "添加cors", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Update)] |
|
|
|
public Task AddCorsAsync(AddCorsInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.AddCorsAsync(input); |
|
|
|
@ -102,7 +93,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("removeCors")] |
|
|
|
[SwaggerOperation(summary: "删除cors", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Update)] |
|
|
|
public Task RemoveCorsAsync(RemoveCorsInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.RemoveCorsAsync(input); |
|
|
|
@ -110,7 +100,6 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers |
|
|
|
|
|
|
|
[HttpPost("enabled")] |
|
|
|
[SwaggerOperation(summary: "禁用client", Tags = new[] { "Client" })] |
|
|
|
[Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Enable)] |
|
|
|
public Task EnabledAsync(EnabledInput input) |
|
|
|
{ |
|
|
|
return _identityServerClientAppService.EnabledAsync(input); |
|
|
|
|