CookieAuthenticationOptions.LoginPath 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
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