Class UserDto
- Namespace
- Builvero.Application.DTOs
- Assembly
- Builvero.Application.dll
Data transfer object representing basic user information returned in authentication responses and user listings.
public class UserDto
- Inheritance
-
UserDto
- Inherited Members
Remarks
This DTO is used in authentication responses (signup, login, OAuth) and provides essential user information for the frontend. Profile photo URLs are automatically converted to presigned URLs for secure access.
Properties
Gets or sets the email address of the user.
public string? Email { get; set; }
Property Value
- string
- Data transfer object representing basic user information returned in authentication responses and user listings.
Remarks
May be null for OAuth-only accounts where the provider did not supply an email.
FullName
Gets or sets the full name of the user from their profile.
public string? FullName { get; set; }
Property Value
- string
- Data transfer object representing basic user information returned in authentication responses and user listings.
Remarks
May be null if the user has not completed their profile.
Id
Gets or sets the unique identifier of the user.
public Guid Id { get; set; }
Property Value
- Guid
- Data transfer object representing basic user information returned in authentication responses and user listings.
IsProfileComplete
Gets or sets a value indicating whether the user has completed their profile setup.
public bool IsProfileComplete { get; set; }
Property Value
- bool
- Data transfer object representing basic user information returned in authentication responses and user listings.
Remarks
A profile is considered complete when all required fields have been provided and meet validation requirements.
ProfilePhotoObjectKey
Gets or sets the raw S3 object key for the profile photo (for debugging and future use).
public string? ProfilePhotoObjectKey { get; set; }
Property Value
- string
- Data transfer object representing basic user information returned in authentication responses and user listings.
Remarks
This field is only populated when the profile photo is stored in S3. It contains the object key (e.g., "profile-photos/{userId}/{fileId}.jpg") which can be used for debugging, logging, or future operations that require direct access to the object key.
This field is separate from ProfilePhotoUrl to maintain a clear distinction between user-facing URLs and internal storage keys.
ProfilePhotoUrl
Gets or sets the user-facing profile photo URL.
public string? ProfilePhotoUrl { get; set; }
Property Value
- string
- Data transfer object representing basic user information returned in authentication responses and user listings.
Remarks
The value of this field depends on the environment and photo storage type:
- Test environment: May contain object key for backward compatibility with tests
- Non-Test environments: Contains external URL (as-is) or presigned S3 URL for secure access
- Legacy external URLs: Returned as-is (e.g., https://example.com/photo.jpg)
- S3 stored photos: Presigned GET URL with expiration (e.g., https://bucket.s3.region.amazonaws.com/...?X-Amz-Algorithm=...)
This field is mapped using ProfilePhotoMapper which implements environment-aware behavior to ensure backward compatibility while maintaining security.
Role
Gets or sets the role assigned to the user as a string (e.g., "User", "Admin", "Moderator").
public string Role { get; set; }
Property Value
- string
- Data transfer object representing basic user information returned in authentication responses and user listings.
Remarks
This is the string representation of the UserRole enum.