共用方式為


CookieAuthenticationOptions.LoginPath 屬性

定義

LoginPath 屬性會通知中介軟體其應該變更傳出 401 未授權狀態碼為 302 重新導向至給定的登入路徑。 產生 401 的目前 URL 會新增至 LoginPath 做為由 ReturnUrlParameter 命名的查詢字串參數。 一旦對 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

屬性值

適用於