File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -57,5 +57,11 @@ public enum SimpleAccessRequirement
5757 /// Set to true to skip all requirement checks in <see cref="SilkierQuartzDefaultAuthorizationHandler"/>
5858 /// </summary>
5959 public bool SkipDefaultRequirementHandler { get ; set ; } = false ;
60+
61+ /// <summary>
62+ /// Provide a name for CookieAuthenticationOptions.Cookie.Name field used to configure services.AddCookie.
63+ /// The value is only used when <see cref="SimpleAccessRequirement"/> is NOT set to <see cref="SimpleAccessRequirement.AllowAnonymous"/>
64+ /// </summary>
65+ public string CookieName { get ; set ; } = "sq_authenticationOptions.AuthScheme" ;
6066 }
6167}
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public static IServiceCollection AddSilkierQuartz(
3636 . AddAuthentication ( authenticationOptions . AuthScheme )
3737 . AddCookie ( authenticationOptions . AuthScheme , cfg =>
3838 {
39- cfg . Cookie . Name = $ "sq_authenticationOptions.AuthScheme" ;
39+ cfg . Cookie . Name = authenticationOptions . CookieName ;
4040 cfg . Cookie . Path = options . VirtualPathRoot ;
4141 cfg . LoginPath = $ "{ options . VirtualPathRoot } { ( options . VirtualPathRoot . EndsWith ( '/' ) ? "" : "/" ) } Authenticate/Login";
4242 cfg . AccessDeniedPath = $ "{ options . VirtualPathRoot } { ( options . VirtualPathRoot . EndsWith ( '/' ) ? "" : "/" ) } Authenticate/Login";
You can’t perform that action at this time.
0 commit comments