@@ -8,15 +8,15 @@ namespace Microsoft.AspNetCore.Antiforgery
88{
99 internal static class AntiforgeryLoggerExtensions
1010 {
11- private static readonly Action < ILogger , Exception > _failedToDeserialzeTokens ;
12- private static readonly Action < ILogger , string , Exception > _validationFailed ;
13- private static readonly Action < ILogger , Exception > _validated ;
14- private static readonly Action < ILogger , string , Exception > _missingCookieToken ;
15- private static readonly Action < ILogger , string , string , Exception > _missingRequestToken ;
16- private static readonly Action < ILogger , Exception > _newCookieToken ;
17- private static readonly Action < ILogger , Exception > _reusedCookieToken ;
18- private static readonly Action < ILogger , Exception > _tokenDeserializeException ;
19- private static readonly Action < ILogger , Exception > _responseCacheHeadersOverridenToNoCache ;
11+ private static readonly Action < ILogger , Exception ? > _failedToDeserialzeTokens ;
12+ private static readonly Action < ILogger , string , Exception ? > _validationFailed ;
13+ private static readonly Action < ILogger , Exception ? > _validated ;
14+ private static readonly Action < ILogger , string ? , Exception ? > _missingCookieToken ;
15+ private static readonly Action < ILogger , string , string ? , Exception ? > _missingRequestToken ;
16+ private static readonly Action < ILogger , Exception ? > _newCookieToken ;
17+ private static readonly Action < ILogger , Exception ? > _reusedCookieToken ;
18+ private static readonly Action < ILogger , Exception ? > _tokenDeserializeException ;
19+ private static readonly Action < ILogger , Exception ? > _responseCacheHeadersOverridenToNoCache ;
2020
2121 static AntiforgeryLoggerExtensions ( )
2222 {
@@ -28,11 +28,11 @@ static AntiforgeryLoggerExtensions()
2828 LogLevel . Debug ,
2929 new EventId ( 2 , "Validated" ) ,
3030 "Antiforgery successfully validated a request." ) ;
31- _missingCookieToken = LoggerMessage . Define < string > (
31+ _missingCookieToken = LoggerMessage . Define < string ? > (
3232 LogLevel . Warning ,
3333 new EventId ( 3 , "MissingCookieToken" ) ,
3434 "The required antiforgery cookie '{CookieName}' is not present." ) ;
35- _missingRequestToken = LoggerMessage . Define < string , string > (
35+ _missingRequestToken = LoggerMessage . Define < string , string ? > (
3636 LogLevel . Warning ,
3737 new EventId ( 4 , "MissingRequestToken" ) ,
3838 "The required antiforgery request token was not provided in either form field '{FormFieldName}' "
@@ -71,12 +71,12 @@ public static void ValidatedAntiforgeryToken(this ILogger logger)
7171 _validated ( logger , null ) ;
7272 }
7373
74- public static void MissingCookieToken ( this ILogger logger , string cookieName )
74+ public static void MissingCookieToken ( this ILogger logger , string ? cookieName )
7575 {
7676 _missingCookieToken ( logger , cookieName , null ) ;
7777 }
7878
79- public static void MissingRequestToken ( this ILogger logger , string formFieldName , string headerName )
79+ public static void MissingRequestToken ( this ILogger logger , string formFieldName , string ? headerName )
8080 {
8181 _missingRequestToken ( logger , formFieldName , headerName , null ) ;
8282 }
0 commit comments