aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-12-03 19:17:50 +0800
committercrupest <crupest@outlook.com>2022-12-03 19:20:04 +0800
commit5239049afe90d2ef926c1e1b917172b5f44b52fc (patch)
treeea212efd7a297b7ddc42fbabc9c830e839c16475 /BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
parent27246baabce5a4c6e5145b16d0eac205e4f092df (diff)
downloadtimeline-5239049afe90d2ef926c1e1b917172b5f44b52fc.tar.gz
timeline-5239049afe90d2ef926c1e1b917172b5f44b52fc.tar.bz2
timeline-5239049afe90d2ef926c1e1b917172b5f44b52fc.zip
Fix upgrade dotnet to v7.
Diffstat (limited to 'BackEnd/Timeline/Auth/MyAuthenticationHandler.cs')
-rw-r--r--BackEnd/Timeline/Auth/MyAuthenticationHandler.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs b/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
index 740f5aee..97cfd738 100644
--- a/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
+++ b/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
@@ -74,7 +74,7 @@ namespace Timeline.Auth
private string? ExtractToken()
{
// check the authorization header
- string header = Request.Headers[HeaderNames.Authorization];
+ string? header = Request.Headers[HeaderNames.Authorization];
if (!string.IsNullOrEmpty(header) && header.StartsWith("Bearer ", StringComparison.OrdinalIgnoreCase))
{
var token = header["Bearer ".Length..].Trim();
@@ -86,7 +86,7 @@ namespace Timeline.Auth
var paramQueryKey = Options.TokenQueryParamKey;
if (!string.IsNullOrEmpty(paramQueryKey))
{
- string token = Request.Query[paramQueryKey];
+ string? token = Request.Query[paramQueryKey];
if (!string.IsNullOrEmpty(token))
{
_logger.LogInformation(Resource.LogTokenFoundInQuery, paramQueryKey, token);