diff options
author | crupest <crupest@outlook.com> | 2021-05-16 20:17:55 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-05-16 20:17:55 +0800 |
commit | 230cffd2a4932fe6b46c5f0e787e6ef4a99ec3ef (patch) | |
tree | 4a54bfd3baa105292271b179b3e02deab0fe050c /BackEnd/Timeline/Auth/MyAuthenticationHandler.cs | |
parent | 07afe9dea19920a95391e5aa2f356264ee563916 (diff) | |
download | timeline-230cffd2a4932fe6b46c5f0e787e6ef4a99ec3ef.tar.gz timeline-230cffd2a4932fe6b46c5f0e787e6ef4a99ec3ef.tar.bz2 timeline-230cffd2a4932fe6b46c5f0e787e6ef4a99ec3ef.zip |
fix: Fix backend signalr auth.
Diffstat (limited to 'BackEnd/Timeline/Auth/MyAuthenticationHandler.cs')
-rw-r--r-- | BackEnd/Timeline/Auth/MyAuthenticationHandler.cs | 11 |
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;
}
|