-
Notifications
You must be signed in to change notification settings - Fork 20
Account improvements #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Account improvements #213
Changes from all commits
9aa5d21
ecd3ce4
6593288
d7edf22
2dd3d81
7712703
4c0e67f
9f1c404
41891d9
061f8dd
3101779
cc61671
7b983c9
74bb5dc
a3ad9fe
aa33596
8fd986d
494d76c
b42b55f
88d43eb
703c08d
a8656c7
4cbc651
2c8ba5a
111fdfa
58f385f
772073b
58e80e2
4ab43f5
e588e2d
c816003
08ef845
db5599b
43cad17
dd939aa
e81b8e2
218706c
241483e
8113873
a8b3b8e
394ea9a
c922aa1
a10b67b
fb80e13
2e33c8b
84356d3
bfa485a
6eb105e
ab7c96c
901203f
7ae5913
403847b
e48a500
c203060
4bbbdfb
ea0b90d
bac5a3c
f5e212c
5ef8785
c0fdd47
2587262
6f11def
fd2b412
0350ffd
3f59444
94311fe
dc25a62
da0073f
0b39181
588e9b0
d78c773
45c9c71
54f5917
c92088a
a93ff1a
d2c32ac
c4e8ecc
10e40cf
e094f0a
edce0bd
a9bc32b
f86a9b9
0e81273
397a76e
0c66540
a9408bc
e093bdf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| namespace UT4MasterServer.Common.Exceptions; | ||
|
|
||
| [Serializable] | ||
| public sealed class AwsSesClientException : Exception | ||
| { | ||
| public AwsSesClientException(string message) : base(message) | ||
| { | ||
| } | ||
|
|
||
| public AwsSesClientException(string message, Exception innerException) : base(message, innerException) | ||
| { | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| namespace UT4MasterServer.Common.Exceptions; | ||
|
|
||
| [Serializable] | ||
| public sealed class EmailVerificationException : Exception | ||
| { | ||
| public EmailVerificationException(string message) : base(message) | ||
| { | ||
| } | ||
|
|
||
| public EmailVerificationException(string message, Exception innerException) : base(message, innerException) | ||
| { | ||
| } | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| namespace UT4MasterServer.Common.Exceptions; | ||
|
|
||
| [Serializable] | ||
| public sealed class NotFoundException : Exception | ||
| { | ||
| public NotFoundException(string message) : base(message) | ||
| { | ||
| } | ||
|
|
||
| public NotFoundException(string message, Exception innerException) : base(message, innerException) | ||
| { | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| namespace UT4MasterServer.Common.Exceptions; | ||
|
|
||
| [Serializable] | ||
| public sealed class RateLimitExceededException : Exception | ||
| { | ||
| public RateLimitExceededException(string message) : base(message) | ||
| { | ||
| } | ||
|
|
||
| public RateLimitExceededException(string message, Exception innerException) : base(message, innerException) | ||
| { | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| namespace UT4MasterServer.Models.DTO.Request; | ||
|
|
||
| public sealed class SendEmailRequest | ||
| { | ||
| public string From { get; set; } = string.Empty; | ||
| public List<string> To { get; set; } = new(); | ||
| public string Subject { get; set; } = string.Empty; | ||
| public string Body { get; set; } = string.Empty; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,6 +69,18 @@ public class Account | |
| [BsonElement("Flags")] | ||
| public AccountFlags Flags { get; set; } = 0; | ||
|
|
||
| [BsonIgnoreIfNull] | ||
| public string? VerificationLinkGUID { get; set; } | ||
|
|
||
| [BsonIgnoreIfNull] | ||
| public DateTime? VerificationLinkExpiration { get; set; } | ||
|
|
||
| [BsonIgnoreIfNull] | ||
| public string? ResetLinkGUID { get; set; } | ||
|
|
||
| [BsonIgnoreIfNull] | ||
| public DateTime? ResetLinkExpiration { get; set; } | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And something like
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These properties come in pair: GUID + ExpirationDate. Not sure if changing will help now because I used term "reset password" all over the place. |
||
|
|
||
| [BsonIgnore] | ||
| public float Level | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| namespace UT4MasterServer.Models.Settings; | ||
|
|
||
| public sealed class AWSSettings | ||
| { | ||
| public string AccessKey { get; set; } = string.Empty; | ||
| public string SecretKey { get; set; } = string.Empty; | ||
| public string RegionName { get; set; } = string.Empty; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| namespace UT4MasterServer.Services.Interfaces; | ||
|
|
||
| public interface IEmailService | ||
| { | ||
| Task SendTextEmailAsync(string fromAddress, List<string> toAddresses, string subject, string body); | ||
| Task SendHTMLEmailAsync(string fromAddress, List<string> toAddresses, string subject, string body); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make more sense to have something like
LastEmailChangeAtbecause that gives more information and control than just having expiry date.LastEmailChangeAtcan be set to null when not needed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These properties come in pair: GUID + ExpirationDate. Not sure if changing will help now because I used term "verification link" all over the place.