aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Auth
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-05-16 20:17:55 +0800
committercrupest <crupest@outlook.com>2021-05-16 20:17:55 +0800
commit7190c888d7216485db860566f0e89037d7aab972 (patch)
treeae1e552175d291f1f20372d84dcc6dc5cbd769bb /BackEnd/Timeline/Auth
parent04737cd734eda58eca5da59d5a6a35c0dc1e9364 (diff)
downloadtimeline-7190c888d7216485db860566f0e89037d7aab972.tar.gz
timeline-7190c888d7216485db860566f0e89037d7aab972.tar.bz2
timeline-7190c888d7216485db860566f0e89037d7aab972.zip
fix: Fix backend signalr auth.
Diffstat (limited to 'BackEnd/Timeline/Auth')
-rw-r--r--BackEnd/Timeline/Auth/MyAuthenticationHandler.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs b/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
index 949dd832..016cc938 100644
--- a/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
+++ b/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
@@ -100,6 +100,17 @@ namespace Timeline.Auth
}
}
+ {
+ var token = Request.Query["access_token"];
+ var path = Context.Request.Path;
+
+ if (!string.IsNullOrEmpty(token) && path.StartsWithSegments("/api/hub"))
+ {
+ _logger.LogInformation(Resource.LogTokenFoundInQuery, "access_token", token);
+ return token;
+ }
+ }
+
// not found anywhere then return null
return null;
}