mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 05:26:34 +00:00
d320d6dd59
Made-with: Cursor
1.4 KiB
1.4 KiB
Module: Azaion.Common.Requests.GetResourceRequest
Purpose
Request DTOs and validator for resource access endpoints. Contains both GetResourceRequest and CheckResourceRequest.
Public Interface
CheckResourceRequest
| Property | Type | Description |
|---|---|---|
Hardware |
string |
Hardware fingerprint to validate |
GetResourceRequest
| Property | Type | Description |
|---|---|---|
Password |
string |
User's password (used to derive encryption key) |
Hardware |
string |
Hardware fingerprint for authorization |
FileName |
string |
Resource file to retrieve |
GetResourceRequestValidator
| Rule | Constraint | Error Code |
|---|---|---|
Password min length |
>= 8 chars | PasswordLengthIncorrect |
Hardware not empty |
Required | BadHardware |
FileName not empty |
Required | WrongResourceName |
Internal Logic
Validator uses BusinessException.GetMessage() to derive user-facing error messages from ExceptionEnum.
Dependencies
BusinessException,ExceptionEnum- FluentValidation
Consumers
Program.cs/resources/get/{dataFolder?}and/resources/checkendpoints
Data Models
None.
Configuration
None.
External Integrations
None.
Security
Password is sent in the POST body (not URL) to avoid logging in access logs. Hardware fingerprint validates device authorization.
Tests
None.