aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Configs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-04-24 22:01:27 +0800
committercrupest <crupest@outlook.com>2021-04-24 22:01:27 +0800
commit7c37a5885437aaf97b9986b7cc2941b5e4316003 (patch)
treec3b9b733e269b4f187f24a12dc08e1f1c88bd7a6 /BackEnd/Timeline/Configs
parent6877db6a535e57fd1d7e01c966a6451dc6f186f0 (diff)
downloadtimeline-7c37a5885437aaf97b9986b7cc2941b5e4316003.tar.gz
timeline-7c37a5885437aaf97b9986b7cc2941b5e4316003.tar.bz2
timeline-7c37a5885437aaf97b9986b7cc2941b5e4316003.zip
refactor: Move token services.
Diffstat (limited to 'BackEnd/Timeline/Configs')
-rw-r--r--BackEnd/Timeline/Configs/JwtConfiguration.cs14
-rw-r--r--BackEnd/Timeline/Configs/JwtOptions.cs8
-rw-r--r--BackEnd/Timeline/Configs/TokenOptions.cs11
3 files changed, 19 insertions, 14 deletions
diff --git a/BackEnd/Timeline/Configs/JwtConfiguration.cs b/BackEnd/Timeline/Configs/JwtConfiguration.cs
deleted file mode 100644
index af8052de..00000000
--- a/BackEnd/Timeline/Configs/JwtConfiguration.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace Timeline.Configs
-{
- public class JwtConfiguration
- {
- public string Issuer { get; set; } = default!;
- public string Audience { get; set; } = default!;
-
- /// <summary>
- /// Set the default value of expire offset of jwt token.
- /// Unit is second. Default is 3600 * 24 seconds, aka 1 day.
- /// </summary>
- public long DefaultExpireOffset { get; set; } = 3600 * 24;
- }
-}
diff --git a/BackEnd/Timeline/Configs/JwtOptions.cs b/BackEnd/Timeline/Configs/JwtOptions.cs
new file mode 100644
index 00000000..c400b8a6
--- /dev/null
+++ b/BackEnd/Timeline/Configs/JwtOptions.cs
@@ -0,0 +1,8 @@
+namespace Timeline.Configs
+{
+ public class JwtOptions
+ {
+ public string Issuer { get; set; } = default!;
+ public string Audience { get; set; } = default!;
+ }
+}
diff --git a/BackEnd/Timeline/Configs/TokenOptions.cs b/BackEnd/Timeline/Configs/TokenOptions.cs
new file mode 100644
index 00000000..e7d4d9e7
--- /dev/null
+++ b/BackEnd/Timeline/Configs/TokenOptions.cs
@@ -0,0 +1,11 @@
+namespace Timeline.Configs
+{
+ public class TokenOptions
+ {
+ /// <summary>
+ /// Set the default value of expire offset of jwt token.
+ /// Unit is second. Default is 3600 * 24 seconds, aka 1 day.
+ /// </summary>
+ public long DefaultExpireSeconds { get; set; } = 3600 * 24;
+ }
+}