CookieAuthenticationOptions.LoginPath 属性

定义

LoginPath 属性通知中间件:应将传出的“401 未授权”状态代码更改为“302 重定向到给定登录路径”。 生成 401 的当前 URL 将作为名为 ReturnUrlParameter 的查询字符串参数添加到 LoginPath。 对 LoginPath 的请求授予新的 SignIn 标识后,将使用 ReturnUrlParameter 值将浏览器重定向回
指向导致原始未授权状态代码的 URL。

public:
 property Microsoft::AspNetCore::Http::PathString LoginPath { Microsoft::AspNetCore::Http::PathString get(); void set(Microsoft::AspNetCore::Http::PathString value); };
public Microsoft.AspNetCore.Http.PathString LoginPath { get; set; }
member this.LoginPath : Microsoft.AspNetCore.Http.PathString with get, set
Public Property LoginPath As PathString

属性值

适用于