diff options
author | crupest <crupest@outlook.com> | 2022-12-03 19:17:50 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-12-03 19:20:04 +0800 |
commit | 5239049afe90d2ef926c1e1b917172b5f44b52fc (patch) | |
tree | ea212efd7a297b7ddc42fbabc9c830e839c16475 /BackEnd/Timeline/Auth/MyAuthenticationHandler.cs | |
parent | 27246baabce5a4c6e5145b16d0eac205e4f092df (diff) | |
download | timeline-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.cs | 4 |
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);
|