mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 16:11:10 +00:00
Updates the authorization roles and permissions API routes
This commit is contained in:
1 parent
09681ba1cd
commit
6a2970beba
34 files changed
+116
-116
No files matched your search
+1
-1
@@ -16,7 +16,7 @@ using System.Threading.Tasks;
|
||||
namespace Lumina.Presentation.Api.Core.Endpoints.Admin.Authorization.Permissions.GetPermissions;
|
||||
|
||||
/// <summary>
|
||||
/// API endpoint for the <c>/permissions</c> route.
|
||||
/// API endpoint for the <c>/auth/permissions</c> route.
|
||||
/// </summary>
|
||||
public class GetPermissionsEndpoint : BaseEndpoint<EmptyRequest, IResult>
|
||||
{
|
||||
|
||||
+4
-4
@@ -40,7 +40,7 @@ public class GetPermissionsEndpointSummary : Summary<GetPermissionsEndpoint, Emp
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "You are not authorized",
|
||||
instance = "/api/v1/permissions"
|
||||
instance = "/api/v1/auth/permissions"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -48,7 +48,7 @@ public class GetPermissionsEndpointSummary : Summary<GetPermissionsEndpoint, Emp
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "Invalid token: The token expired at '01/01/2024 01:00:00'",
|
||||
instance = "/api/v1/permissions"
|
||||
instance = "/api/v1/auth/permissions"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -56,7 +56,7 @@ public class GetPermissionsEndpointSummary : Summary<GetPermissionsEndpoint, Emp
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "The token is invalid",
|
||||
instance = "/api/v1/permissions"
|
||||
instance = "/api/v1/auth/permissions"
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -68,7 +68,7 @@ public class GetPermissionsEndpointSummary : Summary<GetPermissionsEndpoint, Emp
|
||||
title = "General.Failure",
|
||||
status = 403,
|
||||
detail = "NotAuthorized",
|
||||
instance = "/api/v1/permissions",
|
||||
instance = "/api/v1/auth/permissions",
|
||||
traceId = "00-a712bbf99ca8ab485f86a762ae5ae74d-b3a2eb78813b0a5d-00"
|
||||
}
|
||||
);
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ using System.Threading.Tasks;
|
||||
namespace Lumina.Presentation.Api.Core.Endpoints.Admin.Authorization.Roles.AddRole;
|
||||
|
||||
/// <summary>
|
||||
/// API endpoint for the <c>/roles</c> route.
|
||||
/// API endpoint for the <c>/auth/roles</c> route.
|
||||
/// </summary>
|
||||
public class AddRoleEndpoint : BaseEndpoint<AddRoleRequest, IResult>
|
||||
{
|
||||
|
||||
+6
-6
@@ -55,7 +55,7 @@ public class AddRoleEndpointSummary : Summary<AddRoleEndpoint, AddRoleRequest>
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "You are not authorized",
|
||||
instance = "/api/v1/roles"
|
||||
instance = "/api/v1/auth/roles"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -63,7 +63,7 @@ public class AddRoleEndpointSummary : Summary<AddRoleEndpoint, AddRoleRequest>
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "Invalid token: The token expired at '01/01/2024 01:00:00'",
|
||||
instance = "/api/v1/roles"
|
||||
instance = "/api/v1/auth/roles"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public class AddRoleEndpointSummary : Summary<AddRoleEndpoint, AddRoleRequest>
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "The token is invalid",
|
||||
instance = "/api/v1/roles"
|
||||
instance = "/api/v1/auth/roles"
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -83,7 +83,7 @@ public class AddRoleEndpointSummary : Summary<AddRoleEndpoint, AddRoleRequest>
|
||||
title = "General.Failure",
|
||||
status = 403,
|
||||
detail = "NotAuthorized",
|
||||
instance = "/api/v1/roles",
|
||||
instance = "/api/v1/auth/roles",
|
||||
traceId = "00-a712bbf99ca8ab485f86a762ae5ae74d-b3a2eb78813b0a5d-00"
|
||||
}
|
||||
);
|
||||
@@ -95,7 +95,7 @@ public class AddRoleEndpointSummary : Summary<AddRoleEndpoint, AddRoleRequest>
|
||||
title = "General.Conflict",
|
||||
status = 409,
|
||||
detail = "RoleAlreadyExists",
|
||||
instance = "/api/v1/roles",
|
||||
instance = "/api/v1/auth/roles",
|
||||
traceId = "00-f8784de7cb2d70b81b2529893068bee7-4779e0404fe5f554-00"
|
||||
}
|
||||
);
|
||||
@@ -107,7 +107,7 @@ public class AddRoleEndpointSummary : Summary<AddRoleEndpoint, AddRoleRequest>
|
||||
title = "General.Validation",
|
||||
status = 422,
|
||||
detail = "OneOrMoreValidationErrorsOccurred",
|
||||
instance = "/api/v1/roles",
|
||||
instance = "/api/v1/auth/roles",
|
||||
errors = new Dictionary<string, string[]>
|
||||
{
|
||||
{
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ using System.Threading.Tasks;
|
||||
namespace Lumina.Presentation.Api.Core.Endpoints.Admin.Authorization.Roles.DeleteRole;
|
||||
|
||||
/// <summary>
|
||||
/// API endpoint for the <c>/roles</c> route.
|
||||
/// API endpoint for the <c>/auth/roles</c> route.
|
||||
/// </summary>
|
||||
public class DeleteRoleEndpoint : BaseEndpoint<DeleteRoleRequest, IResult>
|
||||
{
|
||||
|
||||
+7
-7
@@ -41,7 +41,7 @@ public class DeleteRoleEndpointSummary : Summary<DeleteRoleEndpoint, DeleteRoleR
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "You are not authorized",
|
||||
instance = "/api/v1/roles/{roleId}"
|
||||
instance = "/api/v1/auth/roles/{roleId}"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -49,7 +49,7 @@ public class DeleteRoleEndpointSummary : Summary<DeleteRoleEndpoint, DeleteRoleR
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "Invalid token: The token expired at '01/01/2024 01:00:00'",
|
||||
instance = "/api/v1/roles/{roleId}"
|
||||
instance = "/api/v1/auth/roles/{roleId}"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -57,7 +57,7 @@ public class DeleteRoleEndpointSummary : Summary<DeleteRoleEndpoint, DeleteRoleR
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "The token is invalid",
|
||||
instance = "/api/v1/roles/{roleId}"
|
||||
instance = "/api/v1/auth/roles/{roleId}"
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -71,7 +71,7 @@ public class DeleteRoleEndpointSummary : Summary<DeleteRoleEndpoint, DeleteRoleR
|
||||
title = "General.Failure",
|
||||
status = 403,
|
||||
detail = "AdminRoleCannotBeDeleted",
|
||||
instance = "/api/v1/roles/{roleId}",
|
||||
instance = "/api/v1/auth/roles/{roleId}",
|
||||
traceId = "00-a712bbf99ca8ab485f86a762ae5ae74d-b3a2eb78813b0a5d-00"
|
||||
},
|
||||
new
|
||||
@@ -80,7 +80,7 @@ public class DeleteRoleEndpointSummary : Summary<DeleteRoleEndpoint, DeleteRoleR
|
||||
title = "General.Failure",
|
||||
status = 403,
|
||||
detail = "NotAuthorized",
|
||||
instance = "/api/v1/roles/{roleId}",
|
||||
instance = "/api/v1/auth/roles/{roleId}",
|
||||
traceId = "00-a712bbf99ca8ab485f86a762ae5ae74d-b3a2eb78813b0a5d-00"
|
||||
}
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public class DeleteRoleEndpointSummary : Summary<DeleteRoleEndpoint, DeleteRoleR
|
||||
title = "General.NotFound",
|
||||
status = 404,
|
||||
detail = "RoleNotFound",
|
||||
instance = "/api/v1/roles/{roleId}",
|
||||
instance = "/api/v1/auth/roles/{roleId}",
|
||||
traceId = "00-57d15dadd702dbd4aeb5dc9b7cee68ee-9330237dbb2ce0e5-00"
|
||||
}
|
||||
);
|
||||
@@ -105,7 +105,7 @@ public class DeleteRoleEndpointSummary : Summary<DeleteRoleEndpoint, DeleteRoleR
|
||||
title = "General.Validation",
|
||||
status = 422,
|
||||
detail = "OneOrMoreValidationErrorsOccurred",
|
||||
instance = "/api/v1/roles/{roleId}",
|
||||
instance = "/api/v1/auth/roles/{roleId}",
|
||||
errors = new Dictionary<string, string[]>
|
||||
{
|
||||
{
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ using System.Threading.Tasks;
|
||||
namespace Lumina.Presentation.Api.Core.Endpoints.Admin.Authorization.Roles.GetRolePermissions;
|
||||
|
||||
/// <summary>
|
||||
/// API endpoint for the <c>/roles/{roleId}/permissions</c> route.
|
||||
/// API endpoint for the <c>/auth/roles/{roleId}/permissions</c> route.
|
||||
/// </summary>
|
||||
public class GetRolePermissionsEndpoint : BaseEndpoint<GetRolePermissionsRequest, IResult>
|
||||
{
|
||||
|
||||
+6
-6
@@ -46,7 +46,7 @@ public class GetRolePermissionsEndpointSummary : Summary<GetRolePermissionsEndpo
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "You are not authorized",
|
||||
instance = "/api/v1/roles/{roleId}/permissions"
|
||||
instance = "/api/v1/auth/roles/{roleId}/permissions"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -54,7 +54,7 @@ public class GetRolePermissionsEndpointSummary : Summary<GetRolePermissionsEndpo
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "Invalid token: The token expired at '01/01/2024 01:00:00'",
|
||||
instance = "/api/v1/roles/{roleId}/permissions"
|
||||
instance = "/api/v1/auth/roles/{roleId}/permissions"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -62,7 +62,7 @@ public class GetRolePermissionsEndpointSummary : Summary<GetRolePermissionsEndpo
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "The token is invalid",
|
||||
instance = "/api/v1/roles/{roleId}/permissions"
|
||||
instance = "/api/v1/auth/roles/{roleId}/permissions"
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -74,7 +74,7 @@ public class GetRolePermissionsEndpointSummary : Summary<GetRolePermissionsEndpo
|
||||
title = "General.Failure",
|
||||
status = 403,
|
||||
detail = "NotAuthorized",
|
||||
instance = "/api/v1/roles/{roleId}/permissions",
|
||||
instance = "/api/v1/auth/roles/{roleId}/permissions",
|
||||
traceId = "00-a712bbf99ca8ab485f86a762ae5ae74d-b3a2eb78813b0a5d-00"
|
||||
}
|
||||
);
|
||||
@@ -86,7 +86,7 @@ public class GetRolePermissionsEndpointSummary : Summary<GetRolePermissionsEndpo
|
||||
title = "General.NotFound",
|
||||
status = 404,
|
||||
detail = "RoleNotFound",
|
||||
instance = "/api/v1/roles/{roleId}/permissions",
|
||||
instance = "/api/v1/auth/roles/{roleId}/permissions",
|
||||
traceId = "00-57d15dadd702dbd4aeb5dc9b7cee68ee-9330237dbb2ce0e5-00"
|
||||
}
|
||||
);
|
||||
@@ -98,7 +98,7 @@ public class GetRolePermissionsEndpointSummary : Summary<GetRolePermissionsEndpo
|
||||
title = "General.Validation",
|
||||
status = 422,
|
||||
detail = "OneOrMoreValidationErrorsOccurred",
|
||||
instance = "/api/v1/roles/{roleId}/permissions",
|
||||
instance = "/api/v1/auth/roles/{roleId}/permissions",
|
||||
errors = new Dictionary<string, string[]>
|
||||
{
|
||||
{
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ using System.Threading.Tasks;
|
||||
namespace Lumina.Presentation.Api.Core.Endpoints.Admin.Authorization.Roles.GetRoles;
|
||||
|
||||
/// <summary>
|
||||
/// API endpoint for the <c>/roles</c> route.
|
||||
/// API endpoint for the <c>/auth/roles</c> route.
|
||||
/// </summary>
|
||||
public class GetRolesEndpoint : BaseEndpoint<EmptyRequest, IResult>
|
||||
{
|
||||
|
||||
+4
-4
@@ -35,7 +35,7 @@ public class GetRolesEndpointSummary : Summary<GetRolesEndpoint, EmptyRequest>
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "You are not authorized",
|
||||
instance = "/api/v1/roles"
|
||||
instance = "/api/v1/auth/roles"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -43,7 +43,7 @@ public class GetRolesEndpointSummary : Summary<GetRolesEndpoint, EmptyRequest>
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "Invalid token: The token expired at '01/01/2024 01:00:00'",
|
||||
instance = "/api/v1/roles"
|
||||
instance = "/api/v1/auth/roles"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -51,7 +51,7 @@ public class GetRolesEndpointSummary : Summary<GetRolesEndpoint, EmptyRequest>
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "The token is invalid",
|
||||
instance = "/api/v1/roles"
|
||||
instance = "/api/v1/auth/roles"
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -63,7 +63,7 @@ public class GetRolesEndpointSummary : Summary<GetRolesEndpoint, EmptyRequest>
|
||||
title = "General.Failure",
|
||||
status = 403,
|
||||
detail = "NotAuthorized",
|
||||
instance = "/api/v1/roles",
|
||||
instance = "/api/v1/auth/roles",
|
||||
traceId = "00-a712bbf99ca8ab485f86a762ae5ae74d-b3a2eb78813b0a5d-00"
|
||||
}
|
||||
);
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ using System.Threading.Tasks;
|
||||
namespace Lumina.Presentation.Api.Core.Endpoints.Admin.Authorization.Roles.UpdateRole;
|
||||
|
||||
/// <summary>
|
||||
/// API endpoint for the <c>/roles</c> route.
|
||||
/// API endpoint for the <c>/auth/roles</c> route.
|
||||
/// </summary>
|
||||
public class UpdateRoleEndpoint : BaseEndpoint<UpdateRoleRequest, IResult>
|
||||
{
|
||||
|
||||
+6
-6
@@ -57,7 +57,7 @@ public class UpdateRoleEndpointSummary : Summary<UpdateRoleEndpoint, UpdateRoleR
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "You are not authorized",
|
||||
instance = "/api/v1/roles"
|
||||
instance = "/api/v1/auth/roles"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public class UpdateRoleEndpointSummary : Summary<UpdateRoleEndpoint, UpdateRoleR
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "Invalid token: The token expired at '01/01/2024 01:00:00'",
|
||||
instance = "/api/v1/roles"
|
||||
instance = "/api/v1/auth/roles"
|
||||
},
|
||||
new
|
||||
{
|
||||
@@ -73,7 +73,7 @@ public class UpdateRoleEndpointSummary : Summary<UpdateRoleEndpoint, UpdateRoleR
|
||||
status = 401,
|
||||
title = "Unauthorized",
|
||||
detail = "The token is invalid",
|
||||
instance = "/api/v1/roles"
|
||||
instance = "/api/v1/auth/roles"
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -85,7 +85,7 @@ public class UpdateRoleEndpointSummary : Summary<UpdateRoleEndpoint, UpdateRoleR
|
||||
title = "General.Failure",
|
||||
status = 403,
|
||||
detail = "NotAuthorized",
|
||||
instance = "/api/v1/roles",
|
||||
instance = "/api/v1/auth/roles",
|
||||
traceId = "00-a712bbf99ca8ab485f86a762ae5ae74d-b3a2eb78813b0a5d-00"
|
||||
}
|
||||
);
|
||||
@@ -97,7 +97,7 @@ public class UpdateRoleEndpointSummary : Summary<UpdateRoleEndpoint, UpdateRoleR
|
||||
title = "General.NotFound",
|
||||
status = 404,
|
||||
detail = "RoleNotFound",
|
||||
instance = "/api/v1/roles",
|
||||
instance = "/api/v1/auth/roles",
|
||||
traceId = "00-57d15dadd702dbd4aeb5dc9b7cee68ee-9330237dbb2ce0e5-00"
|
||||
}
|
||||
);
|
||||
@@ -109,7 +109,7 @@ public class UpdateRoleEndpointSummary : Summary<UpdateRoleEndpoint, UpdateRoleR
|
||||
title = "General.Validation",
|
||||
status = 422,
|
||||
detail = "OneOrMoreValidationErrorsOccurred",
|
||||
instance = "/api/v1/roles",
|
||||
instance = "/api/v1/auth/roles",
|
||||
errors = new Dictionary<string, string[]>
|
||||
{
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user