mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 14:11:10 +00:00
Implements authorization caching and check in the web client
This commit is contained in:
1 parent
7bca5b1ba3
commit
8eb1b9f13c
108 files changed
+5931
-73
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for storing the authorization requirements for accessing a resource.
|
||||
/// </summary>
|
||||
public class AuthorizationRequirementModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The collection of roles required for accessing the resource.
|
||||
/// </summary>
|
||||
public AuthorizationRole[]? Roles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The collection of permissions required for accessing the resource.
|
||||
/// </summary>
|
||||
public AuthorizationPermission[]? Permissions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the policy required for accessing the resource.
|
||||
/// </summary>
|
||||
public Type? PolicyType { get; set; }
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the response model for an account authorization request.
|
||||
/// </summary>
|
||||
/// <param name="UserId">The Id of the user for whom the authorization is retrieved.</param>
|
||||
/// <param name="Roles">The collection of roles associated to the user.</param>
|
||||
/// <param name="Permissions">The collection of permissions associated to the user.</param>
|
||||
[DebuggerDisplay("UserId: {UserId}")]
|
||||
public record GetAuthorizationResponse(
|
||||
Guid UserId,
|
||||
AuthorizationRole[] Roles,
|
||||
AuthorizationPermission[] Permissions
|
||||
);
|
||||
Reference in new issue
Block a user